home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-27 | 175.9 KB | 6,151 lines |
- .\"{{{}}}
- .\"{{{ Notes
- .\" I wrote this manual using Origami, groff 1.08 and the -ms macros.
- .\" It documents *everything* of Origami, so it is worth to have read it
- .\" at least once to get an overview about all features.
- .\"
- .\" Michael Haardt
- .\"}}}
- .\"{{{ roff definitions
- .\" Although I hate macros in documents, there does not seem
- .\" to be another way for this manual. I hope that these macros
- .\" will work with every existing roff and -ms package.
- .\"
- .\"{{{ index
- .\"{{{ iX simple index
- .de iX
- .if \n(tM .tm .iX \\n% \\$1
- ..
- .\"}}}
- .\"{{{ eX example index
- .de eX
- .if \n(tM .tm .eX \\n% \\$1
- ..
- .\"}}}
- .\"{{{ dX definition index
- .de dX
- .if \n(tM .tm .dX \\n% \\$1
- ..
- .\"}}}
- .\"}}}
- .\"{{{ nH
- .ds h1
- .de nH
- .if \\$1==1 \{\
- .ds h1 \\$2
- .bp
- .\}
- .NH \\$1
- \\$2
- .if \n(tM \{\
- .tm .tC \\n% \\$1 \\$2
- .iX "\\$2"
- .\}
- ..
- .\"}}}
- .\"{{{ macros for items (can be nested): header, indented body
- .\"{{{ internal item macros, not used outside these definitions
- .\"{{{ set vars to not in item
- .nr PD 1v
- .nr iT 0
- .\"}}}
- .\"{{{ .hI: header of item
- .de hI
- .KS
- .LP
- ..
- .\"}}}
- .\"{{{ .tI: text for item
- .de tI
- .ie \\n(iT \{\
- .RS .4c
- .\}
- .el .RS .75c
- .nr PD .2v
- .LP
- .nr PD .3v
- .nr iT 1+\\n(iT
- ..
- .\"}}}
- .\"{{{ .eI: end item
- .de eI
- .RE
- .KE
- .nr iT \\n(iT-1
- .if !\\n(iT .nr PD 1v
- ..
- .\"}}}
- .\"}}}
- .\"{{{ item with header bI Ib
- .de bI
- .hI
- \\$1
- .tI
- ..
- .de Ib
- .eI
- ..
- .\"}}}
- .\"{{{ item without header nI In
- .de nI
- .KS
- .tI
- ..
- .de In
- .eI
- ..
- .\"}}}
- .\"{{{ item without body sI Is
- .de sI
- .hI
- \\$1
- .ie \\n(iT .RS .5c
- .el .RS .75c
- .nr iT 1+\\n(iT
- ..
- .de Is
- .eI
- ..
- .\"}}}
- .\"}}}
- .\"{{{ warning
- .de wA
- .LP
- \fBWarning\fP:
- ..
- .\"}}}
- .\"{{{ note beside
- .de nB
- .LP
- \fBN.B.\fP:
- ..
- .\"}}}
- .\"{{{ some text-variables
- .\"{{{ our official home in netland :)
- .ds ac @pool.informatik.rwth-aachen.de
- .\"}}}
- .\"{{{ TEX
- .ds Tx T\v'2p'E\v'-2p'X
- .\"}}}
- .\"{{{ page footer/header
- .ds LH User Guide
- .ds CH - % -
- .ds RH \\*(h1
- .ds LF Origami >>>MAJOR_VERSION<<<.>>>MINOR_VERSION<<<.>>>REVISION<<<
- .ds CF - % -
- .ds RF October 1993
- .\"}}}
- .\"}}}
- .\"{{{ text-macros, need later, but do not know exactly when, so defined here
- .\"{{{ warning, about counting lines
- .de lC
- .wA
- the line count begins at beginning of file. Versions older than 1.6.17 used
- the top of entered fold as the starting point for counting!
- ..
- .\"}}}
- .\"{{{ the text for exit-codes and environment variables
- .nr sS 0
- .de sS
- .ie \\n(sS \{\
- .LP
- .iX >>>ORIFILE<<<
- .iX >>>ORILINE<<<
- .iX >>>ORIWORD<<<
- .iX >>>ORIXPOS<<<
- .iX >>>ORIYPOS<<<
- .iX >>>ORIPID<<<
- \\$1 uses the same environment, shell and exit handling as \\*(eV.
- .\}
- .el \{\
- .ds eV \\$1
- .nr sS 1
- .LP
- .dX >>>ORIFILE<<<
- .dX >>>ORILINE<<<
- .dX >>>ORIWORD<<<
- .dX >>>ORIXPOS<<<
- .dX >>>ORIYPOS<<<
- .dX >>>ORIPID<<<
- .LP
- If command line option \fB\-S\fP\fIshell\fP is given, \fIshell\fP is used (the
- empty word for \fIshell\fP disables this command). Otherwise environment
- variable \fB>>>SHELL<<<\fP (default for \fB>>>SHELL<<<\fP, if empty or not
- defined is \fB>>>BOURNE_SHELL<<<\fP) is used to get the shell name.
- .LP
- The exit code of the called command is stored in the OCL-variable
- \fB>>>OCL_ARG_V<<<\fP (\-1, if no correct value can be given).
- Environment variables \fB>>>ORIFILE<<<\fP, \fB>>>ORILINE<<<\fP and
- \fB>>>ORIWORD<<<\fP are set to current filename, textline and word.
- Word is the sequence of \fBa\fP..\fBzA\fP..\fBZ_\fP, where the cursor
- stands on. Environment variables \fB>>>ORIXPOS<<<\fP and
- \fB>>>ORIYPOS<<<\fP are set to x position (characters 1,..) and y
- position (line 1,..) in file. Environment variable \fB>>>ORIPID<<<\fP
- is set to Origami's process id.
- .lC
- .\}
- ..
- .\"}}}
- .\"{{{ prompt-commands do not store in define-macro-mode
- .de pM
- .wA
- if \\$1 is called during \fB>>>O_DEF_MACRO<<<\fP is active, the given input
- will not be stored in the macro! This command does not activate the
- \fBbegin-\fP / \fB>>>PRO_OUT<<<\fP, because you can do it explicitly
- in the OCL-code.
- ..
- .\"}}}
- .\"{{{ editor_files
- .de eF
- .LP
- .iX "editor files"
- \\$1 adds the file to the list of edited files, if the file is not in
- this list.
- ..
- .\"}}}
- .\"}}}
- .\"}}}
- .\"{{{ Title, abstract and tc
- .\"{{{ Title
- .TL
- .LG
- Origami
- .SM
- .br
- User Guide
- .br
- .br
- .AU
- Michael Haardt
- u31b3hs\*(ac
- .AI
- R\(:utscherstra\(sse 155/1703
- 52072 Aachen
- Germany
- .\"}}}
- .\"{{{ abstract
- .AB
- This document describes all the functions of Origami and the syntax and
- semantics of its control language OCL. The first part describing the
- Origami commands is intended to be read by new users, who need more than
- just a description of bindings as given in the reference cards. The
- second part is intended for OCL programmers. It is very usefull
- if you would like to create or modify bindings. This document assumes
- that you are familiar with the folding concept, as described in the
- introduction manual.
- .AE
- .\"}}}
- .\"{{{ table of contents
- .so tc.AMS
- .\"}}}
- .\"}}}
- .\"{{{ Using Origami
- .nH 1 "Using Origami"
- .\"{{{ Getting started
- .nH 2 "Getting Started"
- .LP
- It is assumed that Origami is installed and ready to use on your system.
- It is invoked by typing \fBorigami\fP at the system prompt. Filenames
- may be typed after \fBorigami\fP \(em if this is not done a prompt for a
- filename will be issued.
- .LP
- If Origami recognizes filenames, starting with a symbolic home directory
- (marked with \fB~\fP[\fIusername\fP]), Origami tries to use the
- corresponding path instead. Therefore the \fBpasswd\fP database is
- read, if \fIusername\fP is given or the value of environment variable
- \fB>>>HOME<<<\fP is used.
- .LP
- If you have not installed any resource files yourself, Origami will
- startup with default files, installed in your Origami directory. The
- resources files can be changed. Look in chapter \fBProgramming in
- OCL\fP for more details.
- .\"{{{ linelength
- .LP
- .dX linelength
- Origami can handle lines up to >>>LINELEN<<< characters. Reading file with
- longer lines will break these lines. In this case, a warning appears at
- the bottom of the screen.
- .\"}}}
- .\"{{{ ctrl-char
- .LP
- .iX ctrl-char
- .iX "null character"
- .iX display
- Control characters will be displayed as \fB>>>CTRL_MARK<<<\fP followed
- by the ASCII coding of the character (\fB>>>CTRL_CHARS<<<\fP for 0..31).
- The null character cannot be handled properly for internal reasons (C
- strings!). Everything following the null character will be ignored.
- newline will cause a line break. It cannot be used as input. Use
- >>>O_RETURN<<< instead. The delete character 127 will be displayed
- \fB>>>CTRL_MARK<<<?\fP.
- .\"}}}
- .\"{{{ highbit-chars
- .LP
- .iX high-bit
- .iX hex
- .iX octal
- .iX ctrl-char
- .iX display
- Characters with set highbit can be displayed octal or hex, using command
- line option \fB\-d\fP\fImode\fP. ctrl-chars can be displayed in the
- same way.
- .\"}}}
- .\"{{{ tabs + spaces
- .iX tab
- .iX space
- .iX display
- The tab character can be displayed in different ways (default is
- \fB\-t8\fP), depending on the chosen command line option:
- .bI "\fB\-t 0\fP:"
- Handle as normal control character.
- .Ib
- .bI "\fB\-t\fP \fIn\fP, \fIn\fP>0:"
- Display tab as whitespace.
- .Ib
- .LP
- Tabs are not allowed in front of fold lines or before indentation level of the
- current fold.
- .LP
- Spaces and tabs at end of line will be deleted when editing a line!
- Trailing spaces and tabs will only remain in the text, if the concerning
- lines are not changed and the lines are not inside indented folds.
- otherwise Origami strips all these characters on writing the file.
- .\"}}}
- .\"{{{ permission and viewmode
- .LP
- .iX view-mode
- If you do not have write permission for the specified file, Origami will
- enter view only mode. Look at the manual page for advanced command
- line options.
- .\"}}}
- .\"{{{ directories
- .LP
- .iX directory
- .iX >>>MATCH_HIST<<<
- .iX >>>NO_MATCH_HIST<<<
- If the current file is a directory, Origami will use a list of filed
- folds for each directory entry as text. Command line options \fB\-f\fP
- and \fB\-F\fP can be used, to control, which files will be shown. The
- corresponding regular expressions can be changed, by changing the
- values in histories \fB>>>MATCH_HIST<<<\fP and \fB>>>NO_MATCH_HIST<<<\fP.
- The OCL variable \fB>>>DIRED_VAR<<<\fP can be set to non-zero, to
- get directory displays in long format.
- .\"}}}
- .\"}}}
- .\"{{{ The screen format
- .nH 2 "The Screen Format"
- .LP
- .iX screen
- .\"{{{ statusline
- .dX "status line"
- .iX language
- .iX modes
- On starting an Origami session, a status line appears near the bottom of
- the screen. This line will probably remain throughout your edit session
- and any prompts or warnings issued by the editor will appear below this
- line. If you use multiple buffers you will see several other status lines,
- one for each open buffer. These status lines tell you which buffer is active
- (selected) and divide the windows into the buffers from each other.
- .\"{{{ modes in statusline
- .LP
- .iX >>>O_A_ECHO<<<
- If you started typing a key sequence bound to a command, this sequence
- will be displayed under the status line, as well. If the second
- character of the line is a star, your file contains unsaved changes.
- The current language and the active modes are indicated in parentheses:
- .\"{{{ table of modes
- .dX >>>FOLD_TAG<<<
- .dX >>>sFOLD_TAG<<<
- .dX >>>DM_TAG<<<
- .dX >>>sDM_TAG<<<
- .dX >>>VIEW_TAG<<<
- .dX >>>sVIEW_TAG<<<
- .dX >>>OVER_TAG<<<
- .dX >>>sOVER_TAG<<<
- .dX >>>AUTO_TAG<<<
- .dX >>>sAUTO_TAG<<<
- .dX >>>NOPAR_TAG<<<
- .dX >>>sNOPAR_TAG<<<
- .dX >>>DV_TAG<<<
- .dX >>>sDV_TAG<<<
- .dX >>>BREGEXP_TAG<<<
- .dX >>>sBREGEXP_TAG<<<
- .dX >>>XREGEXP_TAG<<<
- .dX >>>sXREGEXP_TAG<<<
- .dX >>>H_SHIFT_TAG<<<
- .iX no-parse-mode
- .iX >>>O_CREATE_FOLD<<<
- .iX hash-shift-mode
- .iX view-mode
- .iX overwrite-mode
- .iX autosave-mode
- .iX no-parse-mode
- .iX directory
- .iX regular expression
- .nI
- .TS
- tab(|);
- l l l.
- long|short|meaning
- \fB>>>BREGEXP_TAG<<<\fP|\fB>>>sBREGEXP_TAG<<<\fP|basic regular expressions active
- \fB>>>XREGEXP_TAG<<<\fP|\fB>>>sXREGEXP_TAG<<<\fP|extended regular expressions active
- \fB>>>FOLD_TAG<<<\fP|\fB>>>sFOLD_TAG<<<\fP|creating a fold
- \fB>>>DM_TAG<<<\fP|\fB>>>sDM_TAG<<<\fP|defining a keyboard macro
- \fB>>>VIEW_TAG<<<\fP|\fB>>>sVIEW_TAG<<<\fP|Origami is in view only mode.
- \fB>>>OVER_TAG<<<\fP|\fB>>>sOVER_TAG<<<\fP|Origami is in overwrite mode.
- \fB>>>AUTO_TAG<<<\fP|\fB>>>sAUTO_TAG<<<\fP|Origami is in auto save mode.
- \fB>>>H_SHIFT_TAG<<<\fP|\fB>>>H_SHIFT_TAG<<<\fP|Origami is in hash shift mode
- \fB>>>NOPAR_TAG<<<\fP|\fB>>>sNOPAR_TAG<<<\fP|Origami is in no-parse mode.
- \fB>>>DV_TAG<<<\fP|\fB>>>sDV_TAG<<<\fP|Current file is a directory.
- .TE
- .In
- .\"}}}
- .LP
- .iX >>>O_A_POSI<<<
- .iX linelength
- If the position display mode is active (\fB>>>O_A_POSI<<<\fP), the
- current line and column is displayed in front of the filename. The
- column is the screen coordinate, not the text coordinate. Values
- greater than the linelength (>>>LINELEN<<<) are possible, if the current
- line contains characters, which are displayed with more than one
- character (tabs or control characters).
- .\"}}}
- .\"{{{ long status line
- .LP
- .iX "long status line"
- If the statusline is too long, the short forms are used and in language
- \fBUser\fP, only the first >>>SHORT_F_C_LENGTH<<< characters are shown
- (a cut string will be marked with a trailing \fB$\fP). If required,
- Origami tries to cut the path and displays `\fB>>>CUT_PATH<<<\fP'
- instead of the omitted part of the path.
- .\"}}}
- .\"{{{ name
- .LP
- If there is a name defined in your keybinding file, it is displayed to the
- left of the version number
- (>>>MAJOR_VERSION<<<.>>>MINOR_VERSION<<<.>>>REVISION<<<) instead of
- `\fBOrigami\fP'.
- .\"}}}
- .\"{{{ -W
- .LP
- If Origami was started with command line option '\fB\-W\fP
- \fIstring\fP', \fIstring\fP will be displayed in front of the filename.
- .\"}}}
- .\"}}}
- .\"{{{ buffers
- .LP
- .dX buffer
- .dX "status line"
- .iX prompt
- Origami can edit more than one file at a time. For this, the screen is
- split into windows. Each of these windows displays one of the files
- being edited. Each of the windows has a status line. The active
- buffer has a normal statusline. The other buffer show only filename and
- file-change-status. If more than one buffer is used, each statusline
- starts with the number of the buffer. Prompts and warnings still
- appear at the bottom of the screen.
- .\"}}}
- .\"{{{ prompts
- .LP
- .iX history
- .iX prompt
- .iX >>>FILE_HIST<<<
- .iX >>>SHELL_HIST<<<
- .iX >>>SEARCH_HIST<<<
- .iX >>>REPL_HIST<<<
- .iX >>>MISC_HIST<<<
- Various prompts have a history implemented, which can be used with the
- \fB>>>O_UP<<<\fP and \fB>>>O_DOWN<<<\fP commands. These histories can
- take up to >>>HISTORY_MAX<<< lines, but Origami can reduce the size of
- this histories to >>>HISTORY_SIZE<<<, if the memory is needed. There
- are different histories for commands concerning: shell, search,
- replace, files and miscellanous things.
- .\"{{{ allowed commands in prompts
- Inside prompts only a subset of Origami edit functions is allowed:
- .iX >>>O_LEFT<<<
- .iX >>>O_START_OF_LINE<<<
- .iX >>>O_RIGHT<<<
- .iX >>>O_END_OF_LINE<<<
- .iX >>>O_DELETE<<<
- .iX >>>O_RETURN<<<
- .iX >>>O_DOWN<<<
- .iX >>>O_UP<<<
- .iX >>>O_FILE_C<<<
- .iX >>>TEST_END_LINE<<<
- .iX >>>TEST_BEGIN_LINE<<<
- .iX >>>TEST_CHAR_SET<<<
- .iX >>>TEST_CHAR_LOW_C<<<
- .iX >>>TEST_CHAR_HIGH_C<<<
- .iX >>>TEST_CHAR_C<<<
- .iX >>>TEST_STR<<<
- .iX >>>STORE_CHAR<<<
- .iX >>>O_UNDEL_CHAR<<<
- .iX >>>O_TOGGLE_CASE<<<
- .TS
- l l.
- \fB>>>O_LEFT<<<\fP
- \fB>>>O_START_OF_LINE<<<\fP
- \fB>>>O_RIGHT<<<\fP
- \fB>>>O_END_OF_LINE<<<\fP
- \fB>>>O_DELETE<<<\fP
- \fB>>>O_UNDEL_CHAR<<<\fP
- \fB>>>O_FILE_C<<<\fP
- \fB>>>O_RETURN<<<\fP|end the input, current text is used
- any text characters
- \fB>>>O_UP<<<\fP
- \fB>>>O_DOWN<<<\fP
-
- \fB>>>TEST_BEGIN_LINE<<<\fP
- \fB>>>TEST_END_LINE<<<\fP
- \fB>>>TEST_CHAR_SET<<<\fP
- \fB>>>TEST_CHAR_LOW_C<<<\fP
- \fB>>>TEST_CHAR_HIGH_C<<<\fP
- \fB>>>TEST_CHAR_C<<<\fP
- \fB>>>TEST_STR<<<\fP
- \fB>>>STORE_CHAR<<<\fP
- \fB>>>O_TOGGLE_CASE<<<\fP
- .TE
- .\"}}}
- .\"}}}
- .\"}}}
- .\"{{{ The special editor buffers
- .nH 2 "The Special Editor Buffers"
- .LP
- .dX "move buffer"
- .dX "kill buffer"
- .dX "pick buffer"
- .dX "delete buffer"
- .iX TDS
- There are three special buffers in Origami. The `move buffer' contains
- one text line, the `kill buffer' in which several lines can be collected
- before inserting them back into the file, and the `delete buffer', which
- holds the last >>>UNDEL_LINES<<< deleted lines (in each case a line can be a closed
- fold, with all its contents). The behaviour of these buffers in Origami
- is slightly different from TDS (INMOS Transputer Development System)
- \(em move, delete and kill buffers are lost on exit from Origami. These
- buffers are neither displayed, nor do they have status lines.
- .nB
- the \fBkill-buffer\fP was named \fBpick-buffer\fP in TDS/Multitool and
- old versions of Origami.
- .\"}}}
- .\"{{{ Processing Origami files
- .nH 2 "Processing Origami Files"
- .LP
- .iX mark
- .iX comment
- .iX folding
- If a saved file is to pass through a particular compiler, the fold
- structure must be hidden from the compiler by writing it as comments.
- Origami hides the fold-markers by adding up to >>>FOLD_COMMENT_LENGTH<<<
- characters to the start and end of the fold-marker. As comments differ
- from one language to another, it is necessary to choose the language
- before saving a new file for the first time. When reading a file back
- into Origami the language type is retained. As a consequence you should
- take care not to include compiler comments within the fold header, as this
- will lead to nested comments which are not allowed in some languages.
- .LP
- The general technique for hiding a fold is:
- .\"{{{ example
- .eX folding
- .eX comment
- .eX C
- .DS
- \&{\&{\&{ this is a fold
- \&.\&.\&.F this is a filed fold for file xyz.a
- \&}\&}\&}
- .DE
- appears as
- .DS
- /*\&{\&{\&{ this is a fold*/
- /*\&{\&{\&{F this is a filed fold for file xyz.a*/
- /*\&:\&:\&:F xyz.a*/
- /*\&}\&}\&} */
- /*\&}\&}\&} */
- .DE
- in the text file (language >>>LANG_C<<<).
- .LP
- Origami marks the used comment language with a special line. This line
- will appear in front of the first fold or at end of file (unless
- language >>>LANG_None<<< is active):
- .DS
- /*\&{\&{\&{\&}\&}\&}*/
- .DE
- if language >>>LANG_C<<< is active.
- .\"}}}
- .LP
- Origami knows the following languages, to hide fold-markers:
- .\"{{{ table of values for comments
- .nI
- >>>LANG_LIST<<<
- .In
- .\"}}}
- .\"}}}
- .\"{{{ Inmos files
- .nH 2 ">>>LANG_Inmos<<< Files"
- .iX >>>LANG_Inmos<<<
- .iX transputer
- .iX TDS
- .LP
- The binary >>>LANG_Inmos<<< files can be edited without losing information.
- There are some restrictions on editing >>>LANG_Inmos<<< files:
- .sI "Lines are limited in length to >>>TDS_LEN<<<."
- .Is
- .bI "Filed folds:"
- Origami cannot open filed folds, only entering is possible.
- .LP
- Origami does not automatically remove files belonging to deleted filed
- folds and does not generate unique filenames on filing folds.
- .Ib
- .bI "\fBEXE\fP, \fBLIB\fP, .. :"
- Origami is not able to create special fold-types automatically, but can
- handle existing ones properly. You can use a OCL-command to set
- fold-type and fold-contents within a function or macro to integer
- values.
- .Ib
- .bI ">>>LANG_Inmos<<< and ASCII-files:"
- Since version 1.6.31, the ASCII-format (using fold-languages \fBNONE\fP,
- \fBC\fP, .. ) for >>>LANG_Inmos<<< files has changed. The differences concern only
- the additional fold attributes (like \fBEXE\fP, \fBSC\fP, .. ). The new
- format should be able to save >>>LANG_Inmos<<< files with another language without
- loss of information, but we cannot guarantee this feature! Check this
- in your environment, before using it widely.
- .LP
- Changing the language from >>>LANG_Inmos<<< to another one and writing the file
- only changes the current file. Included filed-folds will not be
- changed by this!
- .Ib
- .bI ">>>LANG_Inmos<<< and trailing spaces or tabs"
- .iX space
- If language >>>LANG_Inmos<<< is used, all trailing spaces or tabs are removed while
- reading/writing files.
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ All Origami functions
- .nH 1 "All Origami functions"
- .LP
- .dX "origami functions"
- This chapter lists all Origami functions with their keybind names. If
- you want to create a new keybinding, examine the files \fB???.keys\fP in
- the \fBbindings\fP directory of your Origami distribution.
- .\"{{{ moving around
- .nH 2 "Moving around"
- .\"{{{ >>>O_LEFT<<<
- .sI \fB>>>O_LEFT<<<\fP
- .Is
- .dX >>>O_LEFT<<<
- .\"}}}
- .\"{{{ >>>O_RIGHT<<<
- .sI \fB>>>O_RIGHT<<<\fP
- .Is
- .dX >>>O_RIGHT<<<
- .\"}}}
- .\"{{{ >>>O_UP<<<
- .sI \fB>>>O_UP<<<\fP
- .Is
- .dX >>>O_UP<<<
- .\"}}}
- .\"{{{ >>>O_DOWN<<<
- .sI \fB>>>O_DOWN<<<\fP
- .Is
- .dX >>>O_DOWN<<<
- .\"}}}
- .\"{{{ >>>O_START_OF_LINE<<<
- .sI \fB>>>O_START_OF_LINE<<<\fP
- .Is
- .dX >>>O_START_OF_LINE<<<
- .\"}}}
- .\"{{{ >>>O_END_OF_LINE<<<
- .sI \fB>>>O_END_OF_LINE<<<\fP
- .Is
- .dX >>>O_END_OF_LINE<<<
- .\"}}}
- .\"{{{ >>>O_PAGE_UP<<<
- .sI \fB>>>O_PAGE_UP<<<\fP
- .Is
- .dX >>>O_PAGE_UP<<<
- .\"}}}
- .\"{{{ >>>O_PAGE_DOWN<<<
- .sI \fB>>>O_PAGE_DOWN<<<\fP
- .Is
- .dX >>>O_PAGE_DOWN<<<
- .\"}}}
- .\"{{{ >>>O_TOP_OF_FOLD<<<
- .bI "\fB>>>O_TOP_OF_FOLD<<<\fP"
- .dX >>>O_TOP_OF_FOLD<<<
- Moves to the beginning of the entered fold.
- .Ib
- .\"}}}
- .\"{{{ >>>O_BOT_OF_FOLD<<<
- .bI "\fB>>>O_BOT_OF_FOLD<<<\fP"
- .dX >>>O_BOT_OF_FOLD<<<
- Moves to the end of the entered fold.
- .Ib
- .\"}}}
- .\"{{{ >>>O_GOTO_LINE<<<
- .bI "\fB>>>O_GOTO_LINE<<<\fP"
- .dX >>>O_GOTO_LINE<<<
- Prompts for a line number and moves the cursor to this line. If needed,
- Origami opens closed folds to reach this line.
- .lC
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ folding
- .nH 2 "Folding"
- .iX folding
- .\"{{{ >>>O_OPEN_FOLD<<<
- .bI "\fB>>>O_OPEN_FOLD<<<\fP"
- .dX >>>O_OPEN_FOLD<<<
- Open fold and show the contents in the context of the current level.
- .wA
- .iX TDS
- unlike TDS, you can not open file folds, only entering them is allowed.
- .Ib
- .\"}}}
- .\"{{{ >>>O_CLOSE_FOLD<<<
- .bI "\fB>>>O_CLOSE_FOLD<<<\fP"
- .dX >>>O_CLOSE_FOLD<<<
- If the cursor is located within an opened fold, close this fold.
- .Ib
- .\"}}}
- .\"{{{ >>>O_ENTER_FOLD<<<
- .bI "\fB>>>O_ENTER_FOLD<<<\fP"
- .dX >>>O_ENTER_FOLD<<<
- Enter the fold at the current line. That means, show only the contents
- of this fold such that this fold starts at indentation 0 - the First
- characters on each line are left at the extreme left of the logical
- window. If the line is a normal fold the x position of the cursor is
- preserved. This may mean that a long line upon which the cursor has been
- placed is scrolled out to the left.
- .LP
- Entering a filed fold saves the current file and switches to the new
- one. The cursor is moved to the top left hand corner of
- the Logical window. The old file and the line are stored internally.
- .eF "\fB>>>O_ENTER_FOLD<<<\fP"
- .LP
- .iX TDS
- Unlike TDS, using this function on normal text lines is allowed.
- Origami uses the string between the cursor position and the next single
- quote, double quote, whitespace or tab as filename. If Origami cannot
- open the file, it will prompt for a filename (empty filename uses
- current file!). The file will be entered as if there was a filed fold
- for it.
- .wA
- since version \fB1.6.85\fP, Origami tries to open
- \&'\fIdirname(current-file)/filename\fP', if the given filed-fold file
- cannot be found using the current working directory.
- .Ib
- .\"}}}
- .\"{{{ >>>O_EXIT_FOLD<<<
- .bI "\fB>>>O_EXIT_FOLD<<<\fP"
- .dX >>>O_EXIT_FOLD<<<
- Exit fold. Show the entered fold as closed fold and the surrounding text
- again.
- .LP
- Exiting a filed fold saves the file, if required.
- .LP
- .iX "editor files"
- Using this function, without having entered a fold, will edit a list of
- all command line files and edited files shown as folds. The cursor is
- moved to the line, containing the entry for the current file.
- .Ib
- .\"}}}
- .\"{{{ >>>O_REMOVE_FOLD<<<
- .bI "\fB>>>O_REMOVE_FOLD<<<\fP"
- .dX >>>O_REMOVE_FOLD<<<
- Remove fold at the current line \(em deletes the fold structure and
- inserts the contents of the fold instead.
- .Ib
- .\"}}}
- .\"{{{ >>>O_CREATE_FOLD<<<
- .bI "\fB>>>O_CREATE_FOLD<<<\fP"
- .dX >>>O_CREATE_FOLD<<<
- .iX >>>M_O_VAR<<<
- Create fold. Use twice \(em first to indicate the top of a new fold,
- then to indicate its bottom. Lines to be included within the fold must
- not be indented less than the fold itself. Tabs are not allowed at the
- beginning of the folded lines if they appear before the intended
- indentation of the fold. Several other keys are disabled while
- >>>O_CREATE_FOLD<<< is active. The part of the text, which would be
- highlighted, is displayed inverse.
- .LP
- The OCL variable \fB>>>M_O_VAR<<<\fP can be used to modify the semantics of
- \fB>>>O_CREATE_FOLD<<<\fP:
- .bI "\fB>>>M_O_VAR<<<\fP=\fB0\fP"
- Normal folding, as described above.
- .Ib
- .bI "\fB>>>M_O_VAR<<<\fP=\fB1\fP"
- Do not fold, but highlight the text, as if folding. Keys, not allowed
- during folding, are also disabled here.
- .Ib
- .bI "\fB>>>M_O_VAR<<<\fP=\fB2\fP"
- Do not fold, but highlight all text between calling position for
- \fB>>>O_CREATE_FOLD<<<\fP and cursor position. Keys, not allowed during
- folding, are also disabled here.
- .Ib
- .bI "\fB>>>M_O_VAR<<<\fP=\fB3\fP"
- Do not fold, but highlight a rectangle text block between calling
- position for \fB>>>O_CREATE_FOLD<<<\fP and cursor position. Keys, not allowed
- during folding, are also disabled here.
- .Ib
- .bI "\fB>>>M_O_VAR<<<\fP=\fB4\fP"
- Do not fold, set highlighting mode but do not highlight anything. Keys,
- not allowed during folding, are also disabled here.
- .Ib
- .bI "\fB>>>M_O_VAR<<<\fP=\fB5\fP"
- Like default \fB>>>O_CREATE_FOLD<<<\fP (\fB>>>M_O_VAR<<<\fP=\fB0\fP),
- but do not highlight anything.
- .Ib
- .bI "\fB>>>M_O_VAR<<<\fP=\fB\-\fP\fIx\fP, \fB1\fP<=\fIx\fP<=\fB4\fP"
- Like \fB>>>M_O_VAR<<<\fP=\fIx\fP, but the command restrictions are weaker. The
- additional allowed commands are slowed down by the screen handling
- routines.
- .Ib
- .bI "other values"
- The behaviour is undefined.
- .Ib
- .nB
- the value of \fB>>>M_O_VAR<<<\fP for the second \fB>>>O_CREATE_FOLD<<<\fP call is
- ignored!
- .Ib
- .\"}}}
- .\"{{{ >>>O_FIRST_LINE_TO_FOLD_H<<<
- .bI "\fB>>>O_FIRST_LINE_TO_FOLD_H<<<\fP"
- .dX >>>O_FIRST_LINE_TO_FOLD_H<<<
- When the cursor is on a opened/closed fold this key will copy the first
- line enclosed by that fold to the fold line.
- .Ib
- .\"}}}
- .\"{{{ >>>O_FILE_FOLD<<<
- .bI "\fB>>>O_FILE_FOLD<<<\fP"
- .dX >>>O_FILE_FOLD<<<
- File (create a new file) or unfile a fold. Creating a file writes the
- contents of the fold into a new file named by the fold comment (up to
- the first whitespace or tab). Unlike TDS, Origami does not create a new
- filename if the chosen one is already used. It does not matter if you
- change the fold comment after filing a fold, because the filename is
- stored internally. Unfiling a filed fold replaces the file link with
- the contents of the file itself.
- .LP
- .iX TDS
- Unlike TDS Origami does not remove the original file included this way.
- .Ib
- .\"}}}
- .\"{{{ >>>O_ATTACH_FILE<<<
- .bI "\fB>>>O_ATTACH_FILE<<<\fP"
- .dX >>>O_ATTACH_FILE<<<
- Attach a file to a fold. This function links an existing file rather
- than creating a new one (and thus differs from toggle-create-file-fold).
- The filename is taken from the comment of the empty fold the cursor is
- placed on. The filename starts behind the foldmark and ends at the
- first whitespace or tab. The rest of the line is ignored. After
- attaching files you can change the fold header because the file
- information is stored internally.
- .LP
- If the cursor is on a filed fold line, the file will be detached from
- the fold.
- .wA
- detaching a file may loose the information about the filename. Fold
- comment and filename may differ! Type and contents of the fold will be
- reset to the default values!
- .wA
- since version \fB1.6.85\fP, Origami tries to attach
- \&'\fIdirname(current-file)/filename\fP', if the given file cannot be
- found using the current working directory. In this case, the filename
- will also be changed in the fold comment!
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ editing
- .nH 2 "Editing"
- .\"{{{ >>>O_DEL_LINE<<<
- .bI "\fB>>>O_DEL_LINE<<<\fP"
- .dX >>>O_DEL_LINE<<<
- Deletes the current line, pushing it onto the delete buffer.
- The delete buffer is a stack with depth >>>UNDEL_LINES<<< lines.
- .Ib
- .\"}}}
- .\"{{{ >>>O_UNDEL_LINE<<<
- .bI "\fB>>>O_UNDEL_LINE<<<\fP"
- .dX >>>O_UNDEL_LINE<<<
- Pop a line from the delete buffer and paste it into the current file
- above the current line. The delete buffer is a stack with depth
- >>>UNDEL_LINES<<< lines.
- .Ib
- .\"}}}
- .\"{{{ >>>O_DELETE<<<
- .bI "\fB>>>O_DELETE<<<\fP"
- .dX >>>O_DELETE<<<
- Deletes the character to the left of the cursor. If the cursor was at
- the left margin, this line will be appended to the previous line.
- .Ib
- .\"}}}
- .\"{{{ >>>O_UNDEL_CHAR<<<
- .bI "\fB>>>O_UNDEL_CHAR<<<\fP"
- .dX >>>O_UNDEL_CHAR<<<
- Undeletes the last deleted character. This stored character is only
- changed by the \fB>>>O_DELETE<<<\fP command.
- .Ib
- .\"}}}
- .\"{{{ >>>O_TOGGLE_CASE<<<
- .bI "\fB>>>O_TOGGLE_CASE<<<\fP"
- .dX >>>O_TOGGLE_CASE<<<
- Changes the case of the character under the cursor.
- .Ib
- .\"}}}
- .\"{{{ >>>O_RETURN<<<
- .bI "\fB>>>O_RETURN<<<\fP"
- .dX >>>O_RETURN<<<
- Opens the line at cursor position and indents the right part like the
- left part.
- .Ib
- .\"}}}
- .\"{{{ >>>O_PICK<<<
- .bI "\fB>>>O_PICK<<<\fP"
- .dX >>>O_PICK<<<
- .iX TDS
- Removes a line from the file and adds it to the end of the kill buffer.
- Note that the `kill buffer' is lost when exiting Origami, unlike TDS.
- .Ib
- .\"}}}
- .\"{{{ >>>O_COPY_PICK<<<
- .bI "\fB>>>O_COPY_PICK<<<\fP"
- .dX >>>O_COPY_PICK<<<
- .iX TDS
- Copies a line to the end of the kill buffer without deleting it from the
- file. Note that the kill buffer is lost when exiting Origami, unlike
- TDS. Lines containing filed folds cannot be copied to the kill buffer,
- while language \fB>>>LANG_Inmos<<<\fP is active.
- .Ib
- .\"}}}
- .\"{{{ >>>O_PUT_PICK<<<
- .bI "\fB>>>O_PUT_PICK<<<\fP"
- .dX >>>O_PUT_PICK<<<
- Places the kill buffer before the current line as a fold with no
- comment.
- .Ib
- .\"}}}
- .\"{{{ >>>O_MOVE<<<
- .bI "\fB>>>O_MOVE<<<\fP"
- .dX >>>O_MOVE<<<
- If the move buffer is empty, the current line is moved to the move
- buffer. Otherwise the move buffer is inserted before the current line.
- Note that the move buffer is lost when exiting Origami, unlike TDS.
- .Ib
- .\"}}}
- .\"{{{ >>>O_COPY<<<
- .bI "\fB>>>O_COPY<<<\fP"
- .dX >>>O_COPY<<<
- Duplicates the current line in the file. Lines containing filed folds
- cannot be duplicated, while language \fB>>>LANG_Inmos<<<\fP is active.
- .Ib
- .\"}}}
- .\"{{{ >>>O_FILTER_LINE<<<
- .bI "\fB>>>O_FILTER_LINE<<<\fP"
- .dX >>>O_FILTER_LINE<<<
- Pipes the current line through a filter. If the current line is a
- closed fold, the contents of this fold is filtered. If the current line
- is a normal text line, this text will be filtered. This command has no
- effect on any other sort of line, other than to report its failure with
- a message. The standard output of the filter will be inserted at the
- position of the line. The line itself will be deleted. The text read
- from the filter will be parsed for folds as expected.
- .sS \fB>>>O_FILTER_LINE<<<\fP
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ search & replace
- .nH 2 "Search and replace"
- .\"{{{ >>>O_FIND<<<
- .bI "\fB>>>O_FIND<<<\fP"
- .dX >>>O_FIND<<<
- Prompts for a search string and moves the cursor to the next occurance. The
- pattern is searched in the currently entered fold.
- .Ib
- .\"}}}
- .\"{{{ >>>O_FIND_REVERSE<<<
- .bI "\fB>>>O_FIND_REVERSE<<<\fP"
- .dX >>>O_FIND_REVERSE<<<
- Same as \fB>>>O_FIND<<<\fP, but searches backward.
- .Ib
- .\"}}}
- .\"{{{ >>>O_REPLACE<<<
- .bI "\fB>>>O_REPLACE<<<\fP"
- .dX >>>O_REPLACE<<<
- Asks for a search and a replace string and replaces all occurances of the search string
- with the replace string. The replace will be done in the currently entered fold.
- .Ib
- .\"}}}
- .\"{{{ >>>O_QUERY_REPLACE<<<
- .bI "\fB>>>O_QUERY_REPLACE<<<\fP"
- .dX >>>O_QUERY_REPLACE<<<
- Same as \fB>>>O_REPLACE<<<\fP, but asks before replacing.
- .Ib
- .\"}}}
- .\"{{{ >>>O_ITS_SEARCH<<<
- .bI "\fB>>>O_ITS_SEARCH<<<\fP"
- .dX >>>O_ITS_SEARCH<<<
- .iX >>>O_RETURN<<<
- .iX >>>O_UP<<<
- .iX >>>O_LEFT<<<
- .iX >>>O_ITS_REVERSE<<<
- .iX >>>O_FIND_REVERSE<<<
- .iX >>>O_DOWN<<<
- .iX >>>O_DELETE<<<
- .iX >>>O_RIGHT<<<
- .iX incremental-search
- .iX >>>O_FIND<<<
- Searches the text for a string. String can be entered incrementally.
- \fB>>>O_DELETE<<<\fP jumps to the position where the character was added
- to the search string. Adding a character tries to find the new string.
- Aborting this command jumps to the calling position. \fB>>>O_RETURN<<<\fP
- ends the search. \fB>>>O_LEFT<<<\fP, \fB>>>O_ITS_REVERSE<<<\fP and
- \fB>>>O_FIND_REVERSE<<<\fP switch the search direction to backwards and
- search the string. \fB>>>O_RIGHT<<<\fP, \fB>>>O_ITS_SEARCH<<<\fP and
- \fB>>>O_FIND<<<\fP switch the search direction to forward and search the
- string. \fB>>>O_UP<<<\fP and \fB>>>O_DOWN<<<\fP walk through the search
- history to get other patterns. The pattern is searched in the currently
- entered fold.
- .LP
- Using \fB>>>O_LEFT<<<\fP, \fB>>>O_ITS_REVERSE<<<\fP, \fB>>>O_FIND_REVERSE<<<\fP,
- \fB>>>O_DOWN<<<\fP, \fB>>>O_RIGHT<<<\fP, \fB>>>O_ITS_SEARCH<<<\fP,
- \fB>>>O_FIND<<<\fP or \fB>>>O_DELETE<<<\fP as first input inside the
- incremental search initializes the search pattern with the last used
- pattern. \fB>>>O_ITS_SEARCH<<<\fP uses \fB>>>O_GOTO_LINE<<<\fP to reach the
- search position if it is not already on the screen.
- .nB
- .iX regular expression
- while basic or extended regular expression search is active and the
- given string is not a valid expression, the cursor will not moved, until
- the string is a valid regular expression! Origami uses the same position
- stack mechanism as without regular expression search.
- .Ib
- .\"}}}
- .\"{{{ >>>O_ITS_REVERSE<<<
- .bI "\fB>>>O_ITS_REVERSE<<<\fP"
- .dX >>>O_ITS_REVERSE<<<
- Same as \fB>>>O_ITS_SEARCH<<<\fP, but starts with search direction
- backwards.
- .Ib
- .\"}}}
- .wA
- Searching reverse is slower then searching forward! Multiple calls of the
- pattern matching algorithm are neccessary, to find a match in front of
- the cursor position!
- .\"}}}
- .\"{{{ files
- .nH 2 "Files"
- .\"{{{ >>>O_OPEN_NEW_FILE<<<
- .bI "\fB>>>O_OPEN_NEW_FILE<<<\fP"
- .dX >>>O_OPEN_NEW_FILE<<<
- Reads another file for editing, saving the current one if required. If
- no filename is given, the current file is reread.
- .eF "\fB>>>O_OPEN_NEW_FILE<<<\fP"
- .Ib
- .\"}}}
- .\"{{{ >>>O_OPEN_BUFFER<<<
- .bI "\fB>>>O_OPEN_BUFFER<<<\fP"
- .dX >>>O_OPEN_BUFFER<<<
- .iX buffer
- Split the current window and prompt for the file, to be edited in the new
- buffer. The new buffer will be opened below the old buffer.
- .LP
- .iX >>>M_O_VAR<<<
- If OCL variable \fB>>>M_O_VAR<<<\fP is not 0, the new buffer will be
- opened:
- .\"{{{ 1=above
- .bI "\fB>>>M_O_VAR<<<\fP=\fB1\fP"
- open above the current buffer
- .Ib
- .\"}}}
- .\"{{{ -1=above and devnull
- .bI "\fB>>>M_O_VAR<<<\fP=\fB\-1\fP"
- open above the current buffer
- .br
- do not ask for a file but open \fB/dev/null\fP
- .Ib
- .\"}}}
- .\"{{{ -2=devnull
- .bI "\fB>>>M_O_VAR<<<\fP=\fB\-2\fP"
- do not ask for a file but open \fB/dev/null\fP
- .Ib
- .\"}}}
- .eF "\fB>>>O_OPEN_BUFFER<<<\fP"
- .Ib
- .\"}}}
- .\"{{{ >>>O_OPEN_W_BUFFER<<<
- .bI "\fB>>>O_OPEN_W_BUFFER<<<\fP"
- .dX >>>O_OPEN_W_BUFFER<<<
- .iX buffer
- Split the current window into two adjacent windows and prompt for the
- file, to be edited in the new buffer. The new buffer will be opened to
- the right of the old buffer.
- .LP
- .iX >>>M_O_VAR<<<
- If OCL variable \fB>>>M_O_VAR<<<\fP is not 0, the new buffer will be opened to the
- left of the old buffer.
- .eF "\fB>>>O_OPEN_W_BUFFER<<<\fP"
- .Ib
- .\"}}}
- .\"{{{ >>>O_OPEN_LIST_FILE<<<
- .bI "\fB>>>O_OPEN_LIST_FILE<<<\fP"
- .dX >>>O_OPEN_LIST_FILE<<<
- Reads another file from list of edited files for editing, saving the
- current one if required. If the given number to low (high),
- \fB>>>O_OPEN_LIST_FILE<<<\fP uses the last (first) file in the list.
- \fB>>>O_OPEN_LIST_FILE<<<\fP tries to reach the same line, you were the
- last time, you edited this file.
- .LP
- .iX >>>M_B_VAR<<<
- If OCL variable \fB>>>M_B_VAR<<<\fP is set to not null,
- \fB>>>O_OPEN_LIST_FILE<<<\fP will not ask for the number and use the
- value \fB\-( >>>M_B_VAR<<< 1)\fP.
- .Ib
- .\"}}}
- .\"{{{ >>>O_OPEN_LIST_BUFFER<<<
- .bI "\fB>>>O_OPEN_LIST_BUFFER<<<\fP"
- .dX >>>O_OPEN_LIST_BUFFER<<<
- .iX buffer
- Split the current window and prompt for the file number to be edited in the
- new buffer, which will be opened below the current buffer.
- .LP
- .iX >>>M_O_VAR<<<
- If OCL variable \fB>>>M_O_VAR<<<\fP is not 0, the new buffer will be opened above the old
- buffer.
- .Ib
- .\"}}}
- .\"{{{ >>>O_OPEN_LIST_W_BUFFER<<<
- .bI "\fB>>>O_OPEN_LIST_W_BUFFER<<<\fP"
- .dX >>>O_OPEN_LIST_W_BUFFER<<<
- .iX buffer
- Split the current window into two adjacent windows and prompt for the
- file number to be edited in the new buffer.
- .LP
- .iX >>>M_O_VAR<<<
- If OCL variable \fB>>>M_O_VAR<<<\fP is not 0, the new buffer will be opened to the
- left of the old buffer.
- .Ib
- .\"}}}
- .\"{{{ >>>O_ENTER_NO_FILE<<<
- .bI "\fB>>>O_ENTER_NO_FILE<<<\fP"
- .dX >>>O_ENTER_NO_FILE<<<
- Like \fB>>>O_ENTER_FOLD<<<\fP, but prompts for a number and enters the given
- file from list of edited files.
- .Ib
- .\"}}}
- .\"{{{ >>>O_SAVE_FILE<<<
- .bI "\fB>>>O_SAVE_FILE<<<\fP"
- .dX >>>O_SAVE_FILE<<<
- Saves the current file with the current name and language. This command
- will only succeed if you have not entered a fold.
- .nB
- if Origami is in view mode, the file will not be saved, even if it was
- changed.
- .Ib
- .\"}}}
- .\"{{{ >>>O_WRITE_FILE<<<
- .bI "\fB>>>O_WRITE_FILE<<<\fP"
- .dX >>>O_WRITE_FILE<<<
- Prompts for a filename and listing-mode. If no filename is given, the
- current filename will be used. Origami writes the text to a new file
- using the current language. If listing-mode is set, the generated file
- will be modified in the following way:
- .iX comment
- .iX mark
- .DS
- no heading \fIcomment\fP \fB{\&{\&{}\&}\&}\fP \fIcomment\fP line
- no \fB{\&{\&{\fP in fold headers
- no \fIcomment\fP \fB}\&}\&}\fP \fIcomment\fP lines
- .DE
- If listing-mode is set, the fold structure in the written file is lost.
- While using the language \fB>>>LANG_Inmos<<<\fP it is impossible to set
- listing-mode, because the the generated files have an incompatible
- structure.
- .Ib
- .\"}}}
- .\"{{{ >>>O_RENAME_FILE<<<
- .bI "\fB>>>O_RENAME_FILE<<<\fP"
- .dX >>>O_RENAME_FILE<<<
- Prompts for a new name for the current file. It will not ask for
- permission, if the current file has been changed. The file-change mode will
- not be changed. The stack of entered file folds is only changed for the
- current file.
- .Ib
- .\"}}}
- .\"{{{ >>>O_INSERT_FILE<<<
- .bI "\fB>>>O_INSERT_FILE<<<\fP"
- .dX >>>O_INSERT_FILE<<<
- Insert File. Prompts for a filename and imports this file into the
- edited file at the current position. If no filename is given, the
- current filename is used.
- .Ib
- .\"}}}
- .\"{{{ >>>O_FILTER_BUFFER<<<
- .bI "\fB>>>O_FILTER_BUFFER<<<\fP"
- .dX >>>O_FILTER_BUFFER<<<
- Filters the current text. Origami prompts for the name of a filter.
- Origami tries to move the cursor back to the line on which the cursor
- was placed before executing this command. Entered folds will be left
- before filtering!
- .sS \fB>>>O_FILTER_BUFFER<<<\fP
- .Ib
- .\"}}}
- .\"{{{ >>>O_PIPE_FROM_COMMAND<<<
- .bI "\fB>>>O_PIPE_FROM_COMMAND<<<\fP"
- .dX >>>O_PIPE_FROM_COMMAND<<<
- Prompts for a command. The command is executed and its standard output
- inserted in the text at current position.
- .sS \fB>>>O_PIPE_FROM_COMMAND<<<\fP
- .Ib
- .\"}}}
- .\"{{{ >>>O_PIPE_TO_COMMAND<<<
- .bI "\fB>>>O_PIPE_TO_COMMAND<<<\fP"
- .dX >>>O_PIPE_TO_COMMAND<<<
- Prompts for a command. The current file will be piped to this command
- as standard input.
- .sS \fB>>>O_PIPE_TO_COMMAND<<<\fP
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ macros
- .nH 2 "Macros"
- .\"{{{ >>>O_DEF_MACRO<<<
- .bI "\fB>>>O_DEF_MACRO<<<\fP"
- .dX >>>O_DEF_MACRO<<<
- .iX macro
- Records all keys in the keyboard macro buffer until >>>O_DEF_MACRO<<< is
- pressed again. Calling user defined functions is also allowed during
- >>>O_DEF_MACRO<<<. \fB>>>O_DEF_MACRO<<<\fP cannot be executed while Origami prompts
- for information for another function (like \fB>>>O_OPEN_NEW_FILE<<<\fP). Origami
- can store up to >>>MAX_MACRO_LENGTH<<< keys.
- .Ib
- .\"}}}
- .\"{{{ >>>O_EXE_MACRO<<<
- .bI "\fB>>>O_EXE_MACRO<<<\fP"
- .dX >>>O_EXE_MACRO<<<
- Call keyboard macro.
- .Ib
- .\"}}}
- .\"{{{ >>>O_DEF_FIX<<<
- .bI "\fB>>>O_DEF_FIX<<<\fP"
- .dX >>>O_DEF_FIX<<<
- Asks for the number of a fix macro buffer. The contents of the keyboard
- macro buffer is copied to this fix macro buffer. Using \fB(>>>DEFMACRO<<< \&..
- )\fP in keybind makes it impossible to overwrite the fix buffer. Using
- \fB\&(>>>DEFMYFIX<<<\fP \fIx\fP\fB)\fP in your OCL source places \fIx\fP
- free macro buffers at places 1..\fIx\fP.
- .Ib
- .\"}}}
- .\"{{{ >>>O_CALL_FIX<<< n
- .bI "\fB>>>O_CALL_FIX<<<\fP \fIn\fP, (\fIn\fP=1,2,..)"
- .dX >>>O_CALL_FIX<<<
- Execute fix-macro number \fIn\fP. This command should be used to call
- macros defined by \fB>>>O_DEF_FIX<<<\fP. All other macro buffers
- are used by \fB(>>>DEFMACRO<<<\fP \fIfoo\fP \fB(...) )\fP and \fB(>>>KEYDEF<<<\fP
- \fIfoo\fP \fB(...) )\fP in keybind, so that using these operations has
- the same effect as calling the function/macro keysequence by their name!
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ shell commands
- .nH 2 "Shell commands"
- .\"{{{ >>>O_SHELL<<<
- .bI "\fB>>>O_SHELL<<<\fP"
- .dX >>>O_SHELL<<<
- .iX >>>SHELL<<<
- Creates a shell according. Exiting from this shell will return to
- Origami.
- .sS \fB>>>O_SHELL<<<\fP
- .Ib
- .\"}}}
- .\"{{{ >>>O_SHELL_COMMAND<<<
- .bI "\fB>>>O_SHELL_COMMAND<<<\fP"
- .dX >>>O_SHELL_COMMAND<<<
- Prompts for a command and starts a shell which executes it.
- .sS \fB>>>O_SHELL_COMMAND<<<\fP
- .Ib
- .\"}}}
- .\"{{{ >>>O_SUSPEND<<<
- .bI "\fB>>>O_SUSPEND<<<\fP"
- .dX >>>O_SUSPEND<<<
- If your system has job control, Origami will be suspended and the calling
- shell is reactivated.
- .nB
- \fB>>>O_SUSPEND<<<\fP is disabled, if command line option \fB\-Z\fP is
- used or the stop signal is disabled by stty.
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ arguments
- .nH 2 "Arguments"
- .LP
- .iX argument
- Like in Emacs, you can repeat each command by using an numerical
- argument. The first digit is given by \fBset-argument-\fP\fIdigit\fP.
- These functions read more digits of the argument until you type a non
- digit. This non digit may be a key sequence bound to a command or just
- a single character. It will be repeated argument times. Pressing the
- abort key will abort the repeated execution. \fBset-argument \fP\fIx\fP
- stops the definition or execution of a keyboard macro!
- .dX set-argument
- .sI "\fB>>>O_REP_0<<<\fP ... \fB>>>O_REP_9<<<\fP"
- .Is
- .LP
- If the argument is set to 0, the command will be executed once.
- .\"}}}
- .\"{{{ special functions
- .nH 2 "Special functions"
- .\"{{{ >>>O_FILE_C<<<
- .bI "\fB>>>O_FILE_C<<<\fP"
- .dX >>>O_FILE_C<<<
- .iX >>>OCL_ARG_V<<<
- If the cursor stands on a whitespace or tab, Origami tries to complete
- the word left from the cursor as filename. If the given word starts
- with a \fB~\fP and does not contain any path-separator, Origami tries to
- complete the user name. The OCL variable \fB>>>OCL_ARG_V<<<\fP is set
- to the number of added characters. If the extended filename belongs to
- a directory, a \fB/\fP will also be appended.
- .Ib
- .\"}}}
- .\"{{{ >>>K_QUOTE<<<
- .bI "\fB>>>K_QUOTE<<<\fP"
- .dX >>>K_QUOTE<<<
- The next character typed in will be inserted in your text, even if it is
- bound to a command.
- .Ib
- .\"}}}
- .\"{{{ >>>O_FLUSH<<<
- .bI "\fB>>>O_FLUSH<<<\fP"
- .dX >>>O_FLUSH<<<
- Refresh the screen (after using \fB>>>SCROFF<<<\fP).
- .Ib
- .\"}}}
- .\"{{{ >>>O_REFRESH<<<
- .bI "\fB>>>O_REFRESH<<<\fP"
- .dX >>>O_REFRESH<<<
- Refresh and center screen. Like \fB>>>O_FLUSH<<<\fP, but also resets
- the window size. If you are working with a window environment which
- does not send a window changed signal, you may use this command after
- resizing a window.
- .LP
- .iX >>>M_O_VAR<<<
- If OCL variable \fB>>>M_O_VAR<<<\fP is set to \fB0\fP, the whole screen will be
- drawn (useful if the screen was messed up by messages...), otherwise
- only the changes will be written.
- .Ib
- .\"}}}
- .\"{{{ >>>O_GROW_BUFFER<<<
- .bI \fB>>>O_GROW_BUFFER<<<\fP
- .dX >>>O_GROW_BUFFER<<<
- .iX buffer
- Increase the height of the current buffer by 1.
- .Ib
- .\"}}}
- .\"{{{ >>>O_SHRINK_BUFFER<<<
- .bI \fB>>>O_SHRINK_BUFFER<<<\fP
- .dX >>>O_SHRINK_BUFFER<<<
- .iX buffer
- Decrease the height of the current buffer by 1. If \fB>>>O_OPEN_BUFFER<<<\fP or
- If there are no (visible or invisible) height divisions the height of
- the used part of the screen will be reduced. This is only done, while
- the current buffer uses more than >>>TXT_MIN_H<<< lines.
- .Ib
- .\"}}}
- .\"{{{ >>>O_GROW_W_BUFFER<<<
- .bI \fB>>>O_GROW_W_BUFFER<<<\fP
- .dX >>>O_GROW_W_BUFFER<<<
- .iX buffer
- Increase the width of the current buffer by 1.
- .Ib
- .\"}}}
- .\"{{{ >>>O_SHRINK_W_BUFFER<<<
- .bI \fB>>>O_SHRINK_W_BUFFER<<<\fP
- .dX >>>O_SHRINK_W_BUFFER<<<
- .iX buffer
- if Several buffers are present decrease the width of the buffer by 1.
- If there are no (visible or invisible) width divisions, the width of the used
- part of the screen is reduced. This is only done, if the current buffer
- uses more than >>>TXT_MIN_W<<< columns.
- .Ib
- .\"}}}
- .\"{{{ >>>O_DESCRIBE_BINDINGS<<<
- .bI "\fB>>>O_DESCRIBE_BINDINGS<<<\fP"
- .dX >>>O_DESCRIBE_BINDINGS<<<
- .iX >>>HOME<<<
- .iX ".origami>>>RC_ENDING<<<"
- Displays the binding information stored in $>>>HOME<<</.origami>>>RC_ENDING<<<. All
- currently recognized keyboard inputs will be printed.
- There are some special keys, which can modify the display of the list:
- .\"{{{ space
- .bI "` ' (space)"
- Move the screen one page up.
- .Ib
- .\"}}}
- .\"{{{ prev-page
- .bI "\fBB\fP or \fBb\fP"
- Show the page before the current one.
- .Ib
- .\"}}}
- .\"{{{ >>>O_RETURN<<<
- .bI "\fB>>>O_RETURN<<<\fP"
- .dX >>>O_RETURN<<<
- Move the screen one line up.
- .Ib
- .\"}}}
- .\"{{{ filter
- .bI "\fBF\fP or \fBf\fP"
- prompts for a pattern and starts the list display again. Only lines
- matching the pattern are displayed. The empty pattern matches all
- lines.
- .Ib
- .\"}}}
- .\"{{{ search
- .bI "\fBS\fP or \fBs\fP"
- Prompts for a pattern and skips forward to the next line matching the
- pattern.
- .Ib
- .\"}}}
- .\"{{{ quit
- .bI "\fBQ\fP or \fBq\fP"
- Stop the help display.
- .Ib
- .\"}}}
- .\"{{{ kill
- .bI "\fBK\fP or \fBk\fP"
- Like \fBQ\fP, but the current help view is copied to the kill buffer. If
- a pattern for filtering is used, only lines, matching this pattern will
- be killed.
- .Ib
- .\"}}}
- .nB
- lines match a pattern, if the contain the pattern literaly.
- .Ib
- .\"}}}
- .\"{{{ >>>O_HELP<<<
- .bI "\fB>>>O_HELP<<<\fP"
- .dX >>>O_HELP<<<
- .iX >>>HOME<<<
- .iX ".origami>>>HELP_ENDING<<<"
- .iX ".origami>>>RC_ENDING<<<"
- Displays the helpfile $>>>HOME<<</.origami>>>HELP_ENDING<<<. Since there is no
- default file for this function, you can create your own helpfile. It
- may be useful for new and very complicated functions/macros or other
- things you always forget. If there is no file $>>>HOME<<</.origami>>>HELP_ENDING<<<,
- Origami tries to get the referencedata from >>>RC_ENDING<<< file.
- .LP
- You can use the same control keys as in \fB>>>O_DESCRIBE_BINDINGS<<<\fP.
- .LP
- .iX @>>>STARTREF_NO<<<
- .iX >>>M_O_VAR<<<
- If OCL variable \fB>>>M_O_VAR<<<\fP is not set to \fB0\fP, the
- corresponding special help entry, generated by \fB@>>>STARTREF_NO<<<\fP
- will be shown. Negative values for \fB>>>M_O_VAR<<<\fP are not allowed
- and \fB>>>M_O_VAR<<<\fP will be set to \fB0\fP in these cases!
- .Ib
- .\"}}}
- .\"{{{ >>>O_LANGUAGE<<<
- .bI "\fB>>>O_LANGUAGE<<<\fP"
- .dX >>>O_LANGUAGE<<<
- .iX comment
- .iX language
- Allows you to select the language for which the code is to be saved \(em
- ie the format in which folds are to be saved. This can be done by
- entering the first character of the language or by using
- \fB>>>O_RIGHT<<<\fP, \fB>>>O_LEFT<<<\fP to move the menu
- cursor, which starts on the currently used language (ie is displayed
- inverse.) If you choose \fBUser\fP, Origami prompts for the begin
- comment and end comment strings used for hiding the fold comments. Each
- string can be up to >>>FOLD_COMMENT_LENGTH<<< characters in length.
- .nB
- if the current language is \fB>>>LANG_Inmos<<<\fP, Origami prompts for permission,
- to prevent destruction of internal >>>LANG_Inmos<<< information.
- .Ib
- .\"}}}
- .\"{{{ >>>O_FOLD_INFO<<<
- .bI "\fB>>>O_FOLD_INFO<<<\fP"
- .dX >>>O_FOLD_INFO<<<
- .iX >>>OCL_ARG_V<<<
- Displays information on current cursor position in file and the
- character under the cursor as character and as octal,decimal and hex
- number. After this, the number of entered folds in current file,
- indentation of currently entered fold and perhaps information about the
- closed foldline under the cursor is displayed. The fold information is
- a pair of numbers. The first number describes the fold type and the
- second the fold contents (range 0..255). These codings have specific
- meanings in TDS. The OCL-variable \fB>>>OCL_ARG_V<<<\fP is set to:
- .nI
- .TS
- tab(|);
- l l.
- 256*type+contents|if type<128
- -(256*(type mod 128)+contents)|otherwise
- .TE
- .In
- .lC
- .Ib
- .\"}}}
- .\"{{{ modes
- .iX modes
- .\"{{{ >>>O_UNCHANGE<<<
- .bI "\fB>>>O_UNCHANGE<<<\fP"
- .dX >>>O_UNCHANGE<<<
- Marks the file as unchanged.
- .Ib
- .\"}}}
- .\"{{{ position
- .bI "\fB>>>O_A_POSI<<<\fP"
- .dX >>>O_A_POSI<<<
- Display current position in front of the filename.
- .Ib
- .bI "\fB>>>O_D_POSI<<<\fP"
- .dX >>>O_D_POSI<<<
- Switch off the display of the current position.
- .Ib
- .\"}}}
- .\"{{{ full-shift
- .bI "\fB>>>O_A_FULLSHIFT<<<\fP"
- .dX >>>O_A_FULLSHIFT<<<
- .dX full-shift-mode
- Activates full-shift mode. Moving over the right border of a buffer
- scrolls the whole buffer, not only the current line!
- .Ib
- .bI "\fB>>>O_D_FULLSHIFT<<<\fP"
- .iX >>>OCL_ARG_V<<<
- .dX >>>O_D_FULLSHIFT<<<
- .iX full-shift-mode
- Switches full-shift mode off and set OCL variable \fB>>>OCL_ARG_V<<<\fP
- to \fB1\fP, if mode \fBfull-shift\fP was active, otherwise \fB0\fP.
- .Ib
- .\"}}}
- .\"{{{ edit/view
- .dX view-mode
- .bI "\fB>>>O_A_VIEW<<<\fP"
- .dX >>>O_A_VIEW<<<
- Sets view only mode. Changing the file is not possible.
- .Ib
- .bI "\fB>>>O_D_VIEW<<<\fP"
- .dX >>>O_D_VIEW<<<
- Sets edit mode.
- .Ib
- .\"}}}
- .\"{{{ insert/overwrite
- .bI "\fB>>>O_A_OVER<<<\fP"
- .dX >>>O_A_OVER<<<
- .dX overwrite-mode
- Sets overwrite mode. Text input will overwrite other text.
- .Ib
- .bI "\fB>>>O_D_OVER<<<\fP"
- .dX >>>O_D_OVER<<<
- Sets insert mode. Text input will be inserted.
- .Ib
- .\"}}}
- .\"{{{ hash-shift
- .bI "\fB>>>O_A_HASH<<<\fP"
- .dX >>>O_A_HASH<<<
- .dX hash-shift-mode
- Activates hash-shift-mode (like command line option \fB\-p\fP).
- On reading files, leading hashes are moved to fold indentation level and
- on writing files, they will be moved to column 1. Useful for editing C
- sources.
- .nB
- this mode is automatically switched on, if the parsed file contains a
- leading \fB#\fP in front of the fold indentation level!
- .Ib
- .bI "\fB>>>O_D_HASH<<<\fP"
- .dX >>>O_D_HASH<<<
- .iX hash-shift-mode
- Switches hash-shift mode off.
- .Ib
- .\"}}}
- .\"{{{ regular-expression-search
- .bI \fB>>>O_A_B_REGEXP<<<\fP
- .dX >>>O_A_B_REGEXP<<<
- .iX regular expression
- The search patterns in \fB>>>O_FIND<<<\fP, \fB>>>O_FIND_REVERSE<<<\fP,
- \fB>>>O_ITS_SEARCH<<<\fP, \fB>>>O_ITS_REVERSE<<<\fP,
- \fB>>>O_REPLACE<<<\fP and \fB>>>O_QUERY_REPLACE<<<\fP are read as basic
- regular expressions (like vi). OCL variable \fB>>>OCL_ARG_V<<<\fP is
- set to \fB1\fP.
- .Ib
- .bI \fB>>>O_A_X_REGEXP<<<\fP
- .dX >>>O_A_X_REGEXP<<<
- .iX regular expression
- The search patterns in \fB>>>O_FIND<<<\fP, \fB>>>O_FIND_REVERSE<<<\fP,
- \fB>>>O_ITS_SEARCH<<<\fP, \fB>>>O_ITS_REVERSE<<<\fP, \fB>>>O_REPLACE<<<\fP
- and \fB>>>O_QUERY_REPLACE<<<\fP are read as extended regular expressions
- (like egrep). OCL variable \fB>>>OCL_ARG_V<<<\fP is set to \fB2\fP.
- .Ib
- .bI \fB>>>O_D_REGEXP<<<\fP
- .dX >>>O_D_REGEXP<<<
- .iX >>>OCL_ARG_V<<<
- .iX regular expression
- The search patterns in \fB>>>O_FIND<<<\fP, \fB>>>O_FIND_REVERSE<<<\fP,
- \fB>>>O_ITS_SEARCH<<<\fP, \fB>>>O_ITS_REVERSE<<<\fP,
- \fB>>>O_REPLACE<<<\fP and \fB>>>O_QUERY_REPLACE<<<\fP are used literaly.
- OCL variable \fB>>>OCL_ARG_V<<<\fP is set to:
- .TS
- tab(|);
- c l.
- Value|Active regular expressions
- 0|none
- 1|basic
- 2|extended
- .TE
- .Ib
- .\"}}}
- .\"{{{ echo on/off
- .bI "\fB>>>O_A_ECHO<<<\fP"
- .dX >>>O_A_ECHO<<<
- Incomplete keysequences are displayed under the status line.
- .Ib
- .bI "\fB>>>O_D_ECHO<<<\fP"
- .dX >>>O_D_ECHO<<<
- Do not show unfinished keysequences.
- .Ib
- .\"}}}
- .\"{{{ time on/off
- .bI "\fB>>>O_A_TIME<<<\fP"
- .dX >>>O_A_TIME<<<
- Display the time right from the filename.
- .nB
- while Origami is waiting for a keyboard input, the display will not be
- updated!
- .Ib
- .bI "\fB>>>O_D_TIME<<<\fP"
- .dX >>>O_D_TIME<<<
- .iX >>>OCL_ARG_V<<<
- Do not display the time right from the filename. OCL variable
- \fB>>>OCL_ARG_V<<<\fP is set to 1(0), if time display was switched
- on(off).
- .Ib
- .\"}}}
- .\"{{{ verbose on/off
- .bI "\fB>>>O_A_VERBOSE<<<\fP"
- .dX >>>O_A_VERBOSE<<<
- .iX verbose
- Switch verbose-mode on. Some commands print error messages.
- .Ib
- .bI "\fB>>>O_D_VERBOSE<<<\fP"
- .dX >>>O_D_VERBOSE<<<
- .iX verbose
- Switch verbose-mode on. Only important messages appear below the status
- line. This is the default.
- .Ib
- .\"}}}
- .\"{{{ auto-save on/off
- .dX autosave-mode
- .bI "\fB>>>O_A_AUTO_SAVE<<<\fP"
- .dX >>>O_A_AUTO_SAVE<<<
- .iX >>>DEFAUTOSAVE<<<
- Prompts for the auto save interval in minutes. Origami will save your
- files periodically in auto save mode, unless \fB>>>DEFAUTOSAVE<<<\fP is
- used. In this case the given macro will be executed instead. Default
- time is >>>NORM_ALARMTIME<<< minutes. Minimum is >>>MIN_ALARMTIME<<<
- minutes and maximum is >>>MAX_ALARMTIME<<< minutes.
- .LP
- If OCL variable \fB >>>M_O_VAR<<<\fP is set to a value \fIx\fP>0,
- \fB>>>O_A_AUTO_SAVE<<<\fP will not prompt for a delay, but use \fIx\fP
- seconds. Very small values for \fIx\fP may be dangerous!
- .LP
- While Origami is waiting for a keyboard input, the save will be delayed!
- .nB
- You have checked in the previous version properly into RCS haven't you?
- .Ib
- .bI "\fB>>>O_D_AUTO_SAVE<<<\fP"
- .dX >>>O_D_AUTO_SAVE<<<
- .iX >>>OCL_ARG_V<<<
- auto save is switched off. The OCL-variable \fB>>>OCL_ARG_V<<<\fP is
- set to the auto save interval in seconds, or 0, if auto save is already
- switched off.
- .Ib
- .\"}}}
- .\"{{{ no-parse on/off
- .dX no-parse-mode
- .bI "\fB>>>O_A_NOPARSE<<<\fP"
- .dX >>>O_A_NOPARSE<<<
- Origami does not parse for folds, whilst reading files (similar to the command
- line option \fB\-n\fP).
- .iX >>>OCL_ARG_V<<<
- The OCL-variable \fB>>>OCL_ARG_V<<<\fP is set to \fB1\fP, if parsing was
- activ, otherwise \fB0\fP.
- .Ib
- .bI "\fB>>>O_D_NOPARSE<<<\fP"
- .dX >>>O_D_NOPARSE<<<
- Origami parses folds during every command where a file is read.
- .iX >>>OCL_ARG_V<<<
- The OCL-variable \fB>>>OCL_ARG_V<<<\fP is set to \fB1\fP, if parsing was
- activ, otherwise \fB0\fP.
- .Ib
- .\"}}}
- .\"{{{ status-line
- .iX "status line"
- .bI "\fB>>>O_TITLE_HIDE<<<\fP"
- .dX >>>O_TITLE_HIDE<<<
- Displaying the status line is disabled.
- .Ib
- .bI "\fB>>>O_TITLE_SHOW<<<\fP"
- .dX >>>O_TITLE_SHOW<<<
- Displaying the status line is enabled.
- .Ib
- .\"}}}
- .\"{{{ display
- .iX display
- .dX >>>O_DSP<<<
- .iX >>>M_O_VAR<<<
- .iX >>>OCL_ARG_V<<<
- .bI "\fB>>>O_DSP<<<\fP"
- Show a menu for selecting the text display mode. You can choose:
- .\"{{{ quit
- .bI "\fBQuit\fP
- Leave the menu loop.
- .Ib
- .\"}}}
- .\"{{{ octal
- .bI "\fBOctal\fP"
- Use the octal format (`\fB\e\fP\fIxxx\fP') for characters, displayed as
- numbers.
- .Ib
- .\"}}}
- .\"{{{ decimal
- .bI "\fBDecimal\fP"
- Use the decimal format (`\fB\ed\fP\fIxxx\fP') for characters, displayed as
- numbers.
- .Ib
- .\"}}}
- .\"{{{ hex
- .bI "\fBHex\fP"
- Use the hexadecimal format (`\fB\e\fP\fIxx\fP') for characters, displayed as
- numbers.
- .Ib
- .\"}}}
- .\"{{{ mark
- .bI "\fBMark\fP"
- Display control characters with \fB>>>CTRL_MARK<<<\fP followed by one of
- the coding characters \fB>>>CTRL_CHARS<<<\fP.
- .Ib
- .\"}}}
- .\"{{{ invers
- .bI "\fBInvers\fP"
- Display control characters as invers coding character.
- .Ib
- .\"}}}
- .\"{{{ number
- .bI "\fBNumber\fP"
- Display control characters as numbers (octal,decimal or hexadecimal).
- .Ib
- .\"}}}
- .\"{{{ tab
- .bI "\fBTab(\fP\fIn\fP\fB)\fP"
- .iX tab
- Prompts for the width of a tab. \fIn\fP is the active size. Negative values
- and 0 will handle the tab as a normal control character.
- .Ib
- .\"}}}
- .\"{{{ plain
- .bI "\fBPlain\fP"
- Display normal characters by temselves.
- .Ib
- .\"}}}
- .\"{{{ 8-Bit
- .bI "\fB8-Bit\fP"
- Display characters with set highbit as numbers (octal,decimal or hexadecimal).
- .Ib
- .\"}}}
- .\"{{{ Full
- .bI "\fBFull\fP"
- Display all characters as numbers (octal,decimal or hexadecimal).
-
- .nB
- .iX area
- .iX "display area"
- the numbered display for normal characters is only used for the text
- display window. The display area and the status line are not concerned!
- .Ib
- .\"}}}
-
- If OCL variable \fB>>>M_O_VAR<<<\fP is not null, the menu loop will be
- ended after the first chosen item.
- .LP
- \fB>>>OCL_ARG_V<<<\fP is set to a coding of the current display mode:
- .sI \fB64*\fP\fItab-width\fP+\fIbit-code\fP
- with
- .bI \fIbit-code\fP uses the bits for:
- .TS
- tab(|);
- c l.
- 0 | inverse control characters
- 1 | marked control characters
- 2 | numbered 8-bit characters
- 3 | all characters numbered
- 4 | octal display
- 5 | decmal display
- .TE
- .Ib
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ no-operation
- .bI "\fBno-operation\fP"
- .dX no-operation
- No operation. This command can be used to explicitly disable keyboard
- inputs.
- .Ib
- .\"}}}
- .\"{{{ >>>O_BELL<<<
- .bI "\fB>>>O_BELL<<<\fP"
- .dX >>>O_BELL<<<
- Activates the bell of your terminal.
- .Ib
- .\"}}}
- .\"{{{ >>>O_BELL_VISIBLE<<<
- .bI "\fB>>>O_BELL_VISIBLE<<<\fP"
- .dX >>>O_BELL_VISIBLE<<<
- Activates the `visible bell' of your terminal.
- .Ib
- .\"}}}
- .\"{{{ >>>O_BREAK<<<
- .bI "\fB>>>O_BREAK<<<\fP"
- .dX >>>O_BREAK<<<
- Aborts any operation. There are several commands which can be aborted
- by this key. This operation can only be bound to a single key. This
- key will even stop a running function/macro, which may be useful to
- interrupt an endless loop. If you are anxious Origami might be doing
- something wrong, this key returns you to a safe state. Writing files
- can also be interrupted. \fB>>>O_BREAK<<<\fP can abort the reading of files for
- the following commands:
- .\"{{{ table of commands
- .nI
- .TS
- tab(|);
- l l.
- Command:|condition:
- \fB>>>O_ENTER_FOLD<<<\fP|a filed fold
- \fB>>>O_EXIT_FOLD<<<\fP|a filed fold
- \fBfile-fold\fP|unfiling a filed fold
- \fB>>>O_INSERT_FILE<<<\fP
- \fB>>>O_FILTER_BUFFER<<<\fP
- \fB>>>O_PIPE_FROM_COMMAND<<<\fP
- reading startup file|edit-file and stdin-pipe
- .TE
- .In
- .\"}}}
- .iX TDS
- In this case, Origami simulates \fBeof\fP for ASCII-reading and
- >>>O_BOT_OF_FOLD<<< for all open folds for TDS-reading.
- .Ib
- .\"}}}
- .\"{{{ >>>O_CHANGE_MARK<<<
- .bI "\fB>>>O_CHANGE_MARK<<<\fP"
- .dX >>>O_CHANGE_MARK<<<
- .iX mark
- Prompts for the fold marks and replaces them by the new one. Works like
- \fB\-M\fP.
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ how to get out
- .nH 2 "How to get out"
- .\"{{{ >>>O_FINISH<<<
- .bI "\fB>>>O_FINISH<<<\fP"
- .dX >>>O_FINISH<<<
- Exits entered folds as needed. Saves the file if changed. If the
- buffer was the last buffer this command exits from Origami.
- .nB
- if Origami is in view mode, the file will not be saved.
- .Ib
- .\"}}}
- .\"{{{ >>>O_QUIT<<<
- .bI "\fB>>>O_QUIT<<<\fP"
- .dX >>>O_QUIT<<<
- If there are unsaved changes to the file in the current buffer, Origami
- prompts for permission to close and quit the buffer anyway.
- .Ib
- .\"}}}
- .\"}}}
- .\"}}}
- .\"{{{ Programming in OCL
- .nH 1 "Programming in OCL"
- .\"{{{ introduction to this chapter
- .LP
- .dX OCL
- This chapter describes OCL (Origami control language) and gives some
- examples to show how powerful it is. OCL is a programming language
- offering capabilities to use conditional statements, subroutines, loops,
- variables and recursion. It looks like LISP, but it is closer to an
- assembly language. The keybind program compiles human readable OCL
- source code into a tokenized binary form which will be interpreted by
- Origami. Every binding of functions to keysequences must be done in this
- binary file. The functions described in the chapter explaining
- keybindings are very simple OCL statements.
- .\"}}}
- .\"{{{ resource files
- .nH 2 "Resource files"
- .LP
- .dX ".origami>>>RC_ENDING<<<"
- .dX ".origami>>>MSG_ENDING<<<"
- .dX ".origami>>>HELP_ENDING<<<"
- .dX >>>ORIPATH<<<
- .dX >>>ORIPATH_1<<<
- .iX path
- Origami needs some startup resource files to work. They are named
- \fB\&.origami\fP\fIending\fP.
- .LP
- Used endings are:
- .\"{{{ >>>MSG_ENDING<<<
- .bI "\fB>>>MSG_ENDING<<<\fP
- This file contains the text strings displayed by Origami during an
- editing session. This file can be changed by editing it.
- .wA
- The length of the lines must not be changed!
- .Ib
- .\"}}}
- .\"{{{ rc
- .bI "\fB>>>RC_ENDING<<<\fP"
- This file contains the binding of functions to keys, the functions, the
- macros and all other stuff, explained below. Use \fBkeybind\fP to
- create new >>>RC_ENDING<<<-files.
- .Ib
- .\"}}}
- .\"{{{ help
- .bI "\fB>>>HELP_ENDING<<<\fP"
- This file will be displayed, when calling the function \fB>>>O_HELP<<<\fP. Any
- text file is allowed.
- .Ib
- .\"}}}
- .LP
- The part \fBorigami\fP in the filename can be changed by setting the
- command line option \fB\-k\fP\fIname\fP or using links to the binary.
- The \fB.origami>>>MSG_ENDING<<<\fP-file must not be renamed, because Origami looks
- for this file, if it cannot find the \fB>>>MSG_ENDING<<<\fP-file with the new name.
- .LP
- You can set the environment variable >>>ORIPATH<<< (or >>>ORIPATH_1<<<) to a
- \fB:\fP or \fB^A\fP separated list of directories (Default is
- \fB>>>ORIGAMI_RC_PATH_STRING<<<\fP). Uppercase variables with \fB:\fP as delimiter
- are usually used in \fBsh\fP and \fBcsh\fP, whereas \fB>>>RC_ENDING<<<\fP is able to
- use real lists in variables (usually written in lowercase letters), which are
- stored with \fB^A\fP as delimiter. Origami looks for the resource files
- in all these directories. If commandline option \fB\-k\fP \fIname\fP is
- used, and \fIname\fP is an absolute path, starting from the root
- directory, origami ignores the resource path to look for the bindings
- file.
- .\"}}}
- .\"{{{ OCL syntax and semantics
- .nH 2 "OCL syntax and semantics"
- .\"{{{ general infos
- .LP
- This section describes all OCL elements. It is assumed you are
- familiar with other programming languages. You will find OCL examples in a
- later section.
- .LP
- .iX comment
- Newlines and comments can be used anywhere in the text between syntactical
- structures. A comment starts with \fB;\fP and ends at end of line.
- .LP
- .iX variable
- .iX integer
- Though different machines have different wordlength, we use a 16 bit
- coding for internal OCL integers. Therefore the only machine
- dependencies is the character coding (ASCII, ..).
- .LP
- Internal integers (addresses in macro code and constants in expressions)
- are limited to \-32768..32767.
- .\"}}}
- .\"{{{ filed folds, include and libs
- .nH 3 "Filed folds and libraries"
- .LP
- .iX libraries
- .iX "Conditional compilation"
- .\"{{{ filed fold or @>>>include_name<<<
- .iX "filed fold"
- .iX ">>>include_name<<<"
- Using language \fBNone\fP, keybind will automatically include the
- contents of filed folds when reading the source file. Entering filed
- fold is limited in depth to >>>OCL_FILE_DEPTH<<<. Normally multiple includes of the
- same file will not work, because redefinition of functions/macros is not
- allowed. To build a clean library, you can use the conditional
- compilation explained below.
- .LP
- Files can be included without filed folds using:
- .sI "\fB@>>>include_name<<<\fP \fIfilename\fP"
- .Is
- .dX @>>>include_name<<<
- .\"}}}
- .\"{{{ @>>>LIB<<<
- .LP
- Another way to include library files is:
- .bI "\fB@>>>LIB<<<\fP \fIfilename\fP"
- .iX libraries
- .dX @>>>LIB<<<
- .dX >>>KBDPATH<<<
- .dX >>>KBDPATH_1<<<
- .iX path
- Keybind looks for the file \fIfilename\fP in several directories, given
- in the keybind library path. This path can be set by environment
- variables \fB>>>KBDPATH<<<\fP or \fB>>>KBDPATH_1<<<\fP (Default is
- \fB>>>KBD_PATH_STRING<<<\fP). Like for resource files, this path is
- a '\fB:\fP' or '\fB^A\fP' separated list of directories. The first
- directory, containing \fIfilename\fP, is used. If \fIfilename\fP is
- an absolute path, keybind ignores the library path.
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ naming the bindings
- .nH 3 "Name and command line options"
- .\"{{{ >>>BINDNAME<<<
- .bI "\fB(>>>BINDNAME<<<\fP \fIname-of-binding\fP [ \fB(\fP \fIstring string\fP \fB)\fP ... ] \fB)\fP"
- .dX >>>BINDNAME<<<
- Defines a name for the binding which is displayed in the status line of
- Origami. If none is given, \fBOrigami\fP will be displayed. Multiple
- usage of this command is not allowed. The name is limited to >>>BIND_NAME_LEN<<<
- characters.
- .LP
- .iX >>>OCL_ARG_V<<<
- .iX "Command line options"
- The optional list of string pairs can be used to define command line
- option aliases. If '\fI( "alias "value )\fP' is defined,
- \&'\fB\-O\fP\fIalias\fP' will be replaced by '\fB\-O\fP\fIvalue\fP' at
- startup. Alias name can use up to >>>BIND_NAME_LEN<<< characters.
- The aliased string may not contain other aliases!
- \fIname-of-binding\fP and the alias names will appear in the \fB\-h\fP
- output for \fB\-O\fP, if the correct >>>RC_ENDING<<< file is read.
- .nB
- option aliases are stored in a fixed size field. There is place for
- >>>NO_OCL_CMD_OPTS<<<, using a >>>BIND_NAME_LEN<<< character name and a
- >>>BIND_NAME_LEN<<< character value. Shorter or longer values are allowed,
- but the total maximum size cannot be changed!
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ bindings
- .nH 3 "Binding commands to keys"
- .LP
- .\"{{{ >>>KEYDEF<<<
- .dX >>>KEYDEF<<<
- .\"{{{ op
- .bI "\fB(>>>KEYDEF<<<\fP \fIoperation\fP \fIkeysequence\fP\fB)\fP"
- The Origami operation named \fIoperation\fP is bound to the keyboard
- input \fIkeysequence\fP. The binding help will contain the entry:
- .DS
- \fBoperation keysequence\fP
- .DE
- .Ib
- .\"}}}
- .\"{{{ char
- .hI
- \fB(>>>KEYDEF<<< "\fP\fIsingle-char\fP \fIkeysequence\fP\fB)\fP
- .tI
- The normal character \fIsingle-char\fP is bound to the keyboard input
- \fIkeysequence\fP. The binding help will contain the entry:
- .DS
- \fBsingle-char keysequence\fP.
- .DE
- For example, this form of keybind can be used to map some keys of a
- keypad to normal characters like + or * while using others as cursor
- keys.
- .eI
- .\"}}}
- .\"{{{ \-
- .bI "\fB(>>>KEYDEF<<< \-\fP \fIkeysequence\fP\fB)\fP"
- .iX >>>KNBM<<<
- \fIkeysequence\fP triggers the \fBkey-not-bound\fP-handling. Complain about
- the unknown sequence, and if \fB>>>KNBM<<<\fP was used, start the
- corresponding action. This bindings will not be stored in the bindings list.
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ >>>KEYALIAS<<<
- .bI "\fB(>>>KEYALIAS<<<\fP \fIname\fP \fIkeysequence\fP\fB)\fP"
- .dX >>>KEYALIAS<<<
- .dX $
- The keyboard input \fIkeysequence\fP can be addressed as
- \fB$\fP\fIname\fP in the following definitions. Using \fB$\fP\fIname\fP
- places the symbolic reference name in the binding help rather than the
- key sequence itself.
- .LP
- Multiple \fB>>>KEYALIAS<<<\fP definitions for a single key \fIname\fP are
- allowed. In this case, every use of \fB$\fP\fIname\fP will generate as
- many sequences, as \fB>>>KEYALIAS<<<\fP are defined.
- .LP
- The following >>>KEYALIAS<<< can be used without declaration:
- .dX $esc
- .DS
- \fB$esc\fP = escape key = 27
- .DE
- .iX autoalias
- Use \fBautoalias\fP to create your >>>KEYALIAS<<< declarations.
- .Ib
- .\"}}}
- .\"{{{ description of operands
- .\"{{{ name
- .bI \fIname\fP
- .dX name
- \fIname\fP is a normal identifier not beginning with \fB@\fP. The length
- is limited to >>>NAME_LG<<<.
- .Ib
- .\"}}}
- .\"{{{ keysequence
- .bI \fIkeysequence\fP
- .dX keysequence
- \fIkeysequence\fP is a sequence of \fIkey\fP enclosed in parentheses.
- \fIkeysequence\fPs are limited in length to >>>ALIAS_LG<<<. \fIkey\fP specifies
- a single key (or two keys, because \fBM\-"a\fP requires two keystrokes).
- Valid declarations for \fIkey\fP are:
- .\"{{{ single char
- .bI \fB"\fP\fIx\fP
- the single character \fIx\fP. ' ' will be named \fBspace\fP in the
- bindinglist.
- .Ib
- .\"}}}
- .\"{{{ control
- .bI \fBC\-\fP\fIX\fP
- .dX C-
- codes the non printable characters. \fB@A\fP..\fBZ[\e]^_\fP codes the
- characters 0..31. \fB?\fP codes 127=delete-key.
- .Ib
- .\"}}}
- .\"{{{ meta
- .bI \fBM\-"\fP\fIx\fP
- .dX M-
- Meta-key (\fBESC\fP) followed by \fIx\fP (case sensitive)
- .Ib
- .\"}}}
- .\"{{{ meta control
- .bI \fBM\-C\-\fP\fIX\fP
- .dX M-C-
- META-control-\fIx\fP, that means Meta-key (\fBESC\fP) followed by
- non-printable character \fBcontrol\fP-\fIx\fP.
- .Ib
- .\"}}}
- .\"{{{ >>>KEYALIAS<<<
- .bI \fB$\fP\fIname\fP
- .iX >>>KEYALIAS<<<
- .iX $
- the key sequence defined by \fB( >>>KEYALIAS<<<\fP \fIname\fP \&.\&.\&.
- \fB)\fP. The bindinglist contains \fIname\fP.
- .Ib
- .\"}}}
- .\"{{{ number
- .bI \fB0x\fP\fIhexdigits\fP
- .dX 0x
- represents the given number
- .Ib
- .\"}}}
- .\"{{{ *
- .bI "\fB*\fP"
- .dX *
- Matches all characters, not explicitly bound in another statement.
- .LP
- .iX KNBM
- .iX \-
- The command `\fBunbind-remaining-keys\fP' has been deleted, but you can use
- `\fB*\fP' in the sequence and `\fB\-\fP' as function can be used to replace it:
- .\"{{{ example for unbind-remaining-keys
- .DS
- ; old syntax
- ( unbind-remaining-keys ( mode-name ) )
-
- ; new syntax
- ( mode mode-name ( >>>KEYDEF<<< - ( * ) ) )
- .DE
- .\"}}}
- The wildcards (`\fB*\fP') in the keysequences are evaluated, after all bindings
- are done. The following example shows the evaluation of \fB*\fP:
- .\"{{{ complex example and explanation for scopes of *
- .DS
- \fB( >>>KEYALIAS<<<\fP \fIf1\fP \fB(\fP \fI$esc "[ "2 "4 "0\fP \fB) )\fP
- \fB( >>>KEYALIAS<<<\fP \fIf2\fP \fB(\fP \fI$esc "[ "2 "4 "1\fP \fB) )\fP
- \fB( >>>KEYALIAS<<<\fP \fIfunction-key-format\fP \fB(\fP \fI$esc "[ *\fP\v'.3m'\h'-.2m'\s-21\s0\h'.2m'\v'-.3m' \fI*\fP\v'.3m'\h'-.2m'\s-22\s0\h'.2m'\v'-.3m' \fI*\fP\v'.3m'\h'-.2m'\s-23\s0\h'.2m'\v'-.3m' \fI"z\fP \fB) )\fP
- ; \fB>>>KEYALIAS<<<\fP does not bind any key, so:
- ; \fI*\fP\v'.3m'\h'-.2m'\s-21-3\s0\h'.2m'\v'-.3m' are not evaluated, only stored
-
- \fB( >>>KEYDEF<<<\fP \fIfun-1\fP \fB(\fP \fI$f1\fP \fB) )\fP
- \fB( >>>KEYDEF<<<\fP \fIfun-2-1\fP \fB(\fP \fI$f2 "1\fP \fB) )\fP
- \fB( >>>KEYDEF<<<\fP \fIfun-2-2\fP \fB(\fP \fI$f2 "2\fP \fB) )\fP
-
- \fB( >>>KEYDEF<<<\fP \fI-\fP \fB(\fP \fI*\fP\v'.3m'\h'-.2m'\s-24\s0\h'.2m'\v'-.3m' \fB) )\fP
- ; only sequences starting with \fI$esc\fP are used, so:
- ; \fI*\fP\v'.3m'\h'-.2m'\s-24\s0\h'.2m'\v'-.3m' matches any character, but the escape character
-
- \fB( >>>KEYDEF<<<\fP \fI-\fP \fB(\fP \fI$function-key-format *\fP\v'.3m'\h'-.2m'\s-25\s0\h'.2m'\v'-.3m' \fB) )\fP
- ; \fI$f1\fP and \fI$f2\fP are used for bindings, so:
- ; \fI*\fP\v'.3m'\h'-.2m'\s-21\s0\h'.2m'\v'-.3m' matches all but `2' here
- ; \fI*\fP\v'.3m'\h'-.2m'\s-22\s0\h'.2m'\v'-.3m' matches all but `4' here
- ; \fI*\fP\v'.3m'\h'-.2m'\s-23\s0\h'.2m'\v'-.3m' matches all but `0' and `1' here
- ; \fI*\fP\v'.3m'\h'-.2m'\s-25\s0\h'.2m'\v'-.3m' matches all but `1' and `2' here
-
- \fB( >>>KEYDEF<<<\fP \fI-\fP \fB(\fP \fI$esc $function-key-format\fP \fB) )\fP
- ; there are no bindings for \fI$esc $esc\fP, so:
- ; \fI*\fP\v'.3m'\h'-.2m'\s-21-3\s0\h'.2m'\v'-.3m' match any character here
- .DE
- .\"}}}
- .Ib
- .\"}}}
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ >>>OVER_PRE<<<
- .bI "\fB(>>>OVER_PRE<<< (\fP \fIprefix\fP ... \fB))\fP"
- .dX >>>OVER_PRE<<<
- .dX prefix
- Binding functions named \fIprefix????\fP to keysequences, uses \fI???\fP as
- name instead of \fIprefix???\fP in the binding help.
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ marks
- .nH 3 "Other marks for folds"
- .iX mark
- .\"{{{ >>>DEFMARK<<<
- .bI "\fB(>>>DEFMARK<<<\fP \fIname\fP \fB(\fP \fImark1\fP \fImark2\fP \fImark3\fP \fImark4\fP \fB))\fP"
- .dX >>>DEFMARK<<<
- This option places the definition of alternative fold marks in the
- >>>RC_ENDING<<<file, so that Origami can switch to these marks when invoked with
- command line option \fB\-m\fP\fIname\fP. \fIname\fP will be cut, if the
- length is \(>= >>>FOLD_PATTERN_LEN<<<. The format for \fImark?\fP is:
- .DS
- \fB(\fP \fIsingle-char\fP \fIsingle-char\fP \fIsingle-char\fP \fB)\fP
- .DE
- where \fIsingle-char\fP is a \fB"\fP\fIx\fP definition like in
- \fB(>>>KEYDEF<<<\fP ... \fB)\fP. The meanings of \fImark1\fP ...
- \fImark4\fP are:
- .\"{{{ table of marks
- .nI
- .ne 7
- .TS
- tab(|);
- l l c.
- item:|used for:|default:
- \fImark1\fP|begin of fold|\fB{\&{\&{\fP
- \fImark2\fP|closed fold|\fB\&.\&.\&.\fP
- \fImark3\fP|name of filed fold|\fB:\&:\&:\fP
- |attributes of fold
- \fImark4\fP|end of fold|\fB}\&}\&}\fP
- .TE
- .In
- .\"}}}
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ Subroutines and macros
- .nH 3 "Functions and macros"
- .iX macro
- .iX function
- .\"{{{ >>>DEFOP<<<
- .bI "\fB(>>>DEFOP<<<\fP \fIname\fP \fB(\fP\fIstatement\fP ... \fB))\fP"
- .dX >>>DEFOP<<<
- .dX macro
- A macro \fIname\fP will be defined. Recursive invocations will be
- detected and handled inside the macro code. The macrocall will be
- replaced by inline code. If the OCL-assembler code for this macro has a
- length 1, this macro can also be bound to keys. Longer macros can only
- be used inside other macro definitions.
- .Ib
- .\"}}}
- .\"{{{ >>>DEFMACRO<<<
- .bI "\fB(>>>DEFMACRO<<<\fP [ \fB(\fP \fIvariable-name\fP ... \fB)\fP ] \fIname\fP \fB(\fP\fIstatement\fP ... \fB))\fP"
- .dX >>>DEFMACRO<<<
- .dX function
- .iX >>>UNDECLARE<<<
- .iX variable
- The operations in \fB(\fP\fIstatement\fP ... \fB)\fP are written to the
- \&.origami>>>RC_ENDING<<< file so that Origami can initialize a fix-macro-buffer with
- the function \fIname\fP. Recursion is allowed. In the OCL text
- following this definition, you can use \fIname\fP as function call or
- for key bindings. You cannot redefine the function (unless you use
- \fB>>>UNDECLARE<<<\fP).
- .LP
- The optional list of variable-names can be used to specify integer arguments,
- which will be set from the caller. Recursion is also supported (the values are
- saved on a stack). Inside \fIstatement\fP, the names given in "\fB(\fP
- \fIvariable-name\fP ... \fB)\fP" overwrite variables, defined using
- "\fB(>>>DEFVAR<<<\fP ... \fB)\fP". After the definition of \fIstatement\fP,
- the variables cannot be accessed anymore.
- .Ib
- .\"}}}
- .\"{{{ >>>DEFASM<<<
- .bI "\fB(>>>DEFASM<<<\fP \fIname\fP \fB(\fP\fIassembler-statement\fP ... \fB))\fP"
- .dX >>>DEFASM<<<
- .iX function
- .iX variable
- .iX >>>FORWARD<<<
- Like \fB>>>DEFMACRO<<<\fP, but the code is given as a list of assembler
- statements. An argument list cannot be given here. If you need the
- assembler function to be called with arguments, use '\fB(>>>FORWARD<<<\fP
- \fIargument-list name\fP \fB)\fP' in front of the \fB>>>DEFASM<<<\fP
- statement. OCL assembler syntax is explained in the appendix.
- .Ib
- .\"}}}
- .\"{{{ >>>INITMACRO<<<
- .bI "\fB(>>>INITMACRO<<<\fP \fIname\fP \fB(\fP\fIstatement\fP ... \fB))\fP"
- .dX >>>INITMACRO<<<
- Like \fB>>>DEFOP<<<\fP. In addition to this, the code is written to the
- >>>RC_ENDING<<<-file to enable the use of \fIname\fP in \fB(>>>KEYDEF<<<\fP \&.\&.\&.
- \fB)\fP statements.
- .wA
- using \fB>>>O_DEF_FIX<<< x\fP has no effect on functions defined
- with \fB>>>INITMACRO<<<\fP, when calling them by their name inside a
- function/macro. If you want to use such an effect you must use
- \fB>>>O_CALL_FIX<<< x\fP in the calling function/macro.
- .Ib
- .\"}}}
- .\"{{{ >>>UNDECLARE<<<
- .bI "\fB(>>>UNDECLARE<<< (\fP \fIname\fP ... \fB))\fP"
- .dX >>>UNDECLARE<<<
- .iX function
- .iX macro
- .iX variable
- Remove functions, macros and variables (explained below) from the symbol
- table. The objects still exist, but the textually following OCL-source
- cannot access them. It can be used, to hide local variables/macros.
- The names can be used again for other purposes without affecting the
- earlier usage. Forwarded functions have to be declared, before
- undeclaring them.
- .LP
- You can also undeclare the standard Origami functions (like
- \fB>>>O_ENTER_FOLD<<<\fP). This can be used to replace the default functions by
- your own:
- .eX >>>DEFOP<<<
- .eX >>>UNDECLARE<<<
- .eX >>>DEFMACRO<<<
- .DS
- ( >>>DEFOP<<< >>>O_ENTER_FOLD<<<-orig ( >>>O_ENTER_FOLD<<< ) )
- ( >>>UNDECLARE<<< ( >>>O_ENTER_FOLD<<< ) )
- ( >>>DEFMACRO<<< >>>O_ENTER_FOLD<<<
- \&.\&.. your code, using >>>O_ENTER_FOLD<<<-orig
- )
- ( >>>UNDECLARE<<< ( >>>O_ENTER_FOLD<<<-orig ) )
- .DE
- .wA
- using \fB>>>UNDECLARE<<<\fP is the only way for redefining things in OCL, but
- this redefiniton has no effect on definitions, made before!
- .Ib
- .\"}}}
- .\"{{{ usermacro
- .bI "\fB(>>>DEFMYFIX<<<\fP \fInumber\fP\fB)\fP"
- .dX usermacros
- .iX function
- This command must be used before any \fB>>>DEFMACRO<<<\fP/\fB>>>INITMACRO<<<\fP
- statement. The fix-macro-buffers 1..\fInumber\fP are not used by OCL to
- store functions. They can be used for \fB>>>O_DEF_FIX<<<\fP.
- .Ib
- .\"}}}
- .\"{{{ which macro places are used
- .nB
- Using the commands \fB>>>DEFMACRO<<<\fP and \fB>>>INITMACRO<<<\fP uses the
- fix-macro-buffers 1,2,.. (or \fIx\fP,\fIx\fP+1,.., if you have used
- \fB(>>>DEFMYFIX<<<\fP \fIx\fP\fB)\fP).
- .\"}}}
- .\"{{{ >>>DEMAND<<<
- .bI "\fB( >>>DEMAND<<< (\fP \fIocl-source\fP \fB) )\fP"
- .dX >>>DEMAND<<<
- .iX >>>DEFAB<<<
- All functions, defined in \fIocl-source\fP using \fB>>>DEFMACRO<<<\fP or
- \fB>>>DEFASM<<<\fP are marked as demand-loading. Origami doesn't read
- them at startup but at first usage. \fB>>>DEMAND<<<\fP statements can be
- nested. The \fB>>>DEFAB<<<\fP or functions called by \fB>>>DEFAB<<<\fP
- may not be marked as demand-loading.
- .Ib
- .\"}}}
- .\"{{{ >>>DEMAND<<< >>>NOT<<<
- .bI "\fB( >>>DEMAND<<< >>>NOT<<<(\fP \fIocl-source\fP \fB) )\fP"
- .dX ">>>DEMAND<<< >>>NOT<<<"
- .iX >>>DEMAND<<<
- .iX >>>NOT<<<
- All functions, defined in \fIocl-source\fP using \fB>>>DEFMACRO<<<\fP or
- \fB>>>DEFASM<<<\fP are not marked as demand-loading. Origami reads them
- at startup. Inside \fIocl-source\fP, no other \fB>>>DEMAND<<<\fP or
- \fB>>>DEMAND<<< >>>NOT<<<\fP statements is allowed.
- .Ib
- .\"}}}
- .\"{{{ >>>START_LIST<<<
- .bI "\fB(>>>START_LIST<<<)\fP
- .dX >>>START_LIST<<<
- Origami starts editing the list of edited files, even if command line
- option \fB\-A\fP is not active or number of files is 1.
- .Ib
- .\"}}}
- .\"{{{ no-statusline
- .bI "\fB(>>>O_TITLE_HIDE<<<)\fP"
- .iX "status line"
- .iX ">>>O_TITLE_SHOW<<<"
- .dX ">>>O_TITLE_HIDE<<<"
- Origami starts without displaying the status line. The Origami commands
- \fB>>>O_TITLE_SHOW<<<\fP and \fB>>>O_TITLE_HIDE<<<\fP can be used during the
- editing to override this default.
- .Ib
- .\"}}}
- .\"{{{ >>>FORWARD<<<
- .bI "\fB(>>>FORWARD<<<\fP [ \fB(\fP \fIvariable-name\fP ... \fB)\fP ] \fIname\fP \fB)\fP"
- .dX >>>FORWARD<<<
- .iX variable
- \fIname\fP is declared as a name for a function defined with \fB>>>INITMACRO<<<\fP
- or \fB>>>DEFMACRO<<<\fP. In the following statements, \fIname\fP can be used as
- function call even before its actual definition with \fB(>>>DEFMACRO<<<\fP
- \fIname\fP ... \fB)\fP.
- .Ib
- .\"}}}
- .\"{{{ >>>B_CHG_MAC<<<
- .bI "\fB(>>>B_CHG_MAC<<<\fP \fIname\fP\fB)\fP"
- .dX >>>B_CHG_MAC<<<
- The function named \fIname\fP is called every time, you switch to
- another buffer.
- .Ib
- .\"}}}
- .\"{{{ automacro
- .bI "\fB(>>>DEFAUTO<<<\fP \fIname\fP\fB)\fP"
- .dX >>>DEFAUTO<<<
- The function named \fIname\fP is called every time a new file is edited,
- either explicitly or by entering or exiting a filed fold.
- .Ib
- .\"}}}
- .\"{{{ abortmacro
- .bI "\fB(>>>DEFAB<<<\fP \fIname\fP\fB)\fP"
- .dX >>>DEFAB<<<
- .iX >>>O_BREAK<<<
- The function named \fIname\fP is executed each time the abort key is
- pressed.
- .Ib
- .\"}}}
- .\"{{{ view
- .bI "\fB(>>>VMAC<<<\fP \fIname\fP\fB)\fP"
- .iX view-mode
- .dX >>>VMAC<<<
- .iX >>>OCL_ARG_V<<<
- The function named \fIname\fP is executed at each attempt to change the
- file in view mode. \fB>>>OCL_ARG_V<<<\fP is set to the ignored OCL
- command.
- .Ib
- .\"}}}
- .\"{{{ promptinmacro
- .bI "\fB(>>>PRO_IN<<<\fP \fIname\fP\fB)\fP"
- .dX >>>PRO_IN<<<
- The function named \fIname\fP is executed each time prompt mode is
- entered (except the OCL commands \fB>>>PROMPT<<<\fP and \fB>>>PROMPT_COUNTER<<<\fP).
- The repeat argument function reads its arguments in prompt mode. The
- function and all called functions/macros may only use the following
- OCL-elements (some of them are explained in the following chapters):
- .\"{{{ tables of allowed elements
- .KS
- .nI
- .TS
- tab(|);
- l l l.
- .\"{{{ controls
- .T&
- l
- l l.
- controls:
- \fB>>>IF<<<\fP-\fB>>>fi_name<<<\fP|\fB>>>IF<<<\fP-\fB>>>ELSE<<<\fP-\fB>>>fi_name<<<\fP
- \fB>>>CASE<<<\fP-\fB>>>DEFAULT<<<\fP-\fB>>>ESAC<<<\fP|\fB>>>LOC<<<\fP
- \fB>>>WHILE<<<\fP|\fB>>>DO<<<\fP-\fB>>>WHILE<<<\fP
- .\"}}}
-
- .\"{{{ commands
- .T&
- l
- l l.
- commands:
- \fB>>>EXIT<<<\fP|\fB>>>MES_EXIT<<<\fP
- \fB>>>SET_COUNTER<<<\fP|modes from \fB(>>>MULTIKBD<<<\fP \&.\&.\&. \fB)\fP
- \fB>>>HISTORY<<<\fP|\fB>>>HISTORY_GET<<<\fP
- \fB>>>O_UNCHANGE<<<\fP
- .\"}}}
-
- .\"{{{ booleans
- .T&
- l s
- l l
- l s
- l l.
- booleans:
- \fB>>>NOT<<<\fP
- \fB>>>AND<<<\fP|\fB>>>OR<<<\fP
- \fB<\fP \fB<>\fP \fB>\fP|\fB<=\fP \fB=\fP \fB>=\fP
- \fB>>>TEST_ECHO<<<\fP|\fB>>>TEST_CHANGED<<<\fP
- \fB>>>LASTMES<<<\fP|\fB>>>TEST_VIEW<<<\fP
- \fB>>>TEST_AUTO<<<\fP|\fB>>>EDITING<<<\fP
- \fB>>>TEST_GEN_FOLD<<<\fP|\fB>>>TEST_LANG<<<\fP
- \fB>>>TEST_OVER<<<\fP|\fB>>>TEST_BEGIN_FOLD<<<\fP
- \fB>>>TEST_FOLD_LINE<<<\fP|\fB>>>TEST_END_FOLD<<<\fP
- \fB>>>TEST_FILED<<<\fP|\fB>>>TEST_TEXT<<<\fP
- \fB>>>TEST_HASH<<<\fP
- .\"}}}
-
- .\"{{{ terms
- .T&
- l
- l l l.
- terms:
- \fB>>>SET_ENTER<<<\fP|\fB>>>SET_S_ENTER<<<\fP|\fB>>>FILETYPE<<<\fP
- numbers|characters|
- \fB+\fP|\fB\-\fP|\fB*\fP
- \fB>>>MOD<<<\fP|\fB>>>DIV<<<\fP
- .\"}}}
- .TE
- .In
- .KE
- .\"}}}
- .wA
- keybind does not check if you only use the allowed commands! Only the
- valid commands in called functions/macros will be executed. All other
- commands will be ignored, but do not rely on this feature!
- .Ib
- .\"}}}
- .\"{{{ promptoutmacro
- .bI "\fB(>>>PRO_OUT<<<\fP \fIname\fP\fB)\fP"
- .dX >>>PRO_OUT<<<
- The function named \fIname\fP is executed each time prompt mode is finished
- (except the OCL commands \fB>>>PROMPT<<<\fP and \fB>>>PROMPT_COUNTER<<<\fP). The
- command restrictions for the function are the same as in
- \fB>>>PRO_IN<<<\fP.
- .Ib
- .\"}}}
- .\"{{{ keynotbound
- .bI "\fB(>>>KNBM<<<\fP \fIname\fP\fB)\fP"
- .dX >>>KNBM<<<
- The function named \fIname\fP is executed each time an illegal keysequence
- was entered. The command restrictions for the function are the same as in
- \fB>>>PRO_IN<<<\fP.
- .Ib
- .\"}}}
- .\"{{{ >>>DEFAUTOSAVE<<<
- .bI "\fB(>>>DEFAUTOSAVE<<<\fP \fIname\fP\fB)\fP"
- .dX >>>DEFAUTOSAVE<<<
- .iX autosave-mode
- If \fB>>>DEFAUTOSAVE<<<\fP is given, the execution of this macro
- replaces the saving of all changed files.
- .Ib
- .\"}}}
- .\"{{{ >>>DEFQUIT<<<
- .bI "\fB(>>>DEFQUIT<<<\fP \fIname\fP\fB)\fP"
- .dX >>>DEFQUIT<<<
- If set, Origami tries to execute \fIname\fP, if Origami got the signal SIGQUIT.
- .Ib
- .\"}}}
- .\"{{{ >>>DEFU1<<<
- .bI "\fB(>>>DEFU1<<<\fP \fIname\fP\fB)\fP"
- .dX >>>DEFU1<<<
- If set, Origami tries to execute \fIname\fP, if Origami got the signal SIGUSR1.
- .Ib
- .\"}}}
- .\"{{{ >>>DEFU2<<<
- .bI "\fB(>>>DEFU2<<<\fP \fIname\fP\fB)\fP"
- .dX >>>DEFU2<<<
- If set, Origami tries to execute \fIname\fP, if Origami got the signal SIGUSR2.
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ control structures
- .nH 3 "Control structures"
- .LP
- A \fIstatement\fP can be one of the following control structures or
- functions:
- .\"{{{ >>>WHILE<<<
- .bI "\fB>>>WHILE<<<\fP \fIcondition\fP \fB(\fP\fIstatement\fP ... \fB)\fP"
- .dX >>>WHILE<<<
- Prechecked loop, \fIstatement\fP ... is repeated while the condition is
- true.
- .Ib
- .\"}}}
- .\"{{{ >>>DO<<< >>>WHILE<<<
- .bI "\fB>>>DO<<< (\fP\fIstatement\fP ... \fB) >>>WHILE<<<\fP \fIcondition\fP"
- .dX >>>DO<<<
- .dX >>>WHILE<<<
- Postchecked loop, \fIstatement\fP ... is repeated until the condition
- is false.
- .Ib
- .\"}}}
- .\"{{{ >>>IF<<< >>>ELSE<<< >>>fi_name<<<
- .bI "\fB>>>IF<<<\fP \fIcondition\fP \fB(\fP\fIstatement\fP ... \fB)\fP [ \fB>>>ELSE<<< (\fP\fIstatement\fP ... \fB)\fP ] \fB>>>fi_name<<<\fP"
- .dX >>>IF<<<
- .dX >>>ELSE<<<
- .dX >>>fi_name<<<
- Conditional statement. If condition is true, the first statement list
- is executed. If condition is false, the second statement list, if
- given, is executed.
- .Ib
- .\"}}}
- .\"{{{ >>>CASE<<< >>>ESAC<<<
- .bI "\fB>>>CASE<<< (\fP\fIcondition\fP \fB(\fP\fIstatement\fP ... \fB))\fP ... [ \fB>>>DEFAULT<<< (\fP\fIstatement\fP ... \fB)\fP ] \fB>>>ESAC<<<\fP"
- .dX >>>CASE<<<
- .dX >>>ESAC<<<
- .dX >>>DEFAULT<<<
- Conditional statement. The block of statements following the first
- conditional expression evaluating to TRUE is executed. If none of the
- conditions is true, the given default statements are executed.
- .Ib
- .\"}}}
- .\"{{{ >>>REPEAT<<<
- .bI "\fB>>>REPEAT<<<\fP \fIterm\fP \fB(\fP\fIstatement\fP ... \fB)\fP"
- .dX >>>REPEAT<<<
- \fB(\fP\fIstatement\fP ... \fB)\fP is repeated \fIterm\fP times.
- .wA
- old versions of keybind stored the called statements \fIterm\fP times.
- \fIterm\fP had to be a constant! This new version of keybind generates
- code, which uses an internal OCL-variable to count the loops. The
- number of repeats need not be a constant! The repeated statement list is
- \fB>>>NOT<<<\fP called via a subroutine call, so \fB>>>RETURN<<<\fP will
- leave the current function/macro, not only the \fB>>>REPEAT<<<\fP!
- .Ib
- .\"}}}
- .\"{{{ >>>PROMPT<<<
- .bI "\fB>>>PROMPT<<<\fP \fImessage-string\fP"
- .dX >>>PROMPT<<<
- .dX message-string
- Displays \fImessage-string\fP below the status line and waits for
- \fB>>>O_RETURN<<<\fP. If Origami is in define-macro-mode, the
- \fB>>>O_RETURN<<<\fP will not be stored! \fImessage-string\fP can be:
- .\"{{{ decription of message-string
- .sI "\fIstring\fP"
- .Is
- .bI "\fB(\fP\fImessage-string-item\fP ... \fB)\fP"
- This list of \fImessage-string-item\fPs can contain more complicated entries.
- They are:
- .\"{{{ string
- .sI "\fIstring\fP"
- .Is
- .\"}}}
- .\"{{{ var
- .bI "\fB>>>COUNTER<<<\fP \fIname\fP"
- This will be replaced by the ASCII-representation of the value of
- OCL-variable \fIname\fP.
- .Ib
- .\"}}}
- .\"{{{ number
- .bI "\fInumber\fP"
- This will be replaced by the ASCII-representation of \fInumber\fP.
- .Ib
- .\"}}}
- .\"{{{ history
- .bI "\fB>>>HISTORY<<<\fP \fIhistory-name\fP"
- .iX >>>HISTORY<<<
- .iX history-name
- .iX >>>HISTORY_GET<<<
- use the text of "\fB>>>HISTORY_GET<<<\fP \fIhistory-name\fP \fB0\fP".
- \fB>>>HISTORY_GET<<<\fP is explained below.
- .Ib
- .\"}}}
- .\"{{{ ori-message
- .bI "\fIorigami-message\fP"
- where \fIorigami-message\fP can be one of the message names declared in
- the Origami sources, file >>>MSG_ENDING<<<. Empty strings will be substituted for %s
- formatting arguments. Random values will be used to replace all other
- formatting arguments.
- .Ib
- .\"}}}
- .Ib
- .wA
- Origami cuts long \fImessage-string\fPs after >>>LINELEN<<< characters.
- .\"}}}
- .LP
- Origami displays \fImessage-string\fP and waits until you type a
- \fB>>>O_RETURN<<<\fP on your keyboard. The given input will
- \fB>>>NOT<<<\fP be interpreted. Thus, typing the keysequence of a function
- not execute it.
- .pM \fB>>>PROMPT<<<\fP
- .Ib
- .\"}}}
- .\"{{{ >>>MESSAGE<<<
- .bI "\fB>>>MESSAGE<<<\fP \fImessage-string\fP"
- .dX >>>MESSAGE<<<
- .iX message-string
- Like \fB>>>PROMPT<<<\fP, but does not wait for input.
- .LP
- .iX >>>M_O_VAR<<<
- If OCL variable \fB>>>M_O_VAR<<<\fP is not 0, the message will only be printed,
- if command line option \fB\-V\fP is active.
- .Ib
- .\"}}}
- .\"{{{ exits
- .bI "\fB>>>EXIT<<<\fP"
- .dX >>>EXIT<<<
- All running functions are aborted.
- .Ib
- .bI "\fB>>>MES_EXIT<<<\fP \fImessage-string\fP"
- .iX message-string
- .dX >>>MES_EXIT<<<
- Same as >>>EXIT<<<. \fImessage-string\fP is displayed under the status line.
- .Ib
- .\"}}}
- .\"{{{ >>>RETURN<<<
- .bI "\fB>>>RETURN<<<\fP"
- .dX >>>RETURN<<<
- The currently executed function/macro ends and the caller (keyboard,
- function or macro) resumes execution.
- .Ib
- .\"}}}
- .\"{{{ >>>LOC<<<
- .bI "\fB>>>LOC<<< (\fP\fIname\fP ... \fB) (\fP\fIstatement\fP ... \fB)\fP"
- .dX >>>LOC<<<
- The values of the variables \fIname\fP ... are saved during the
- execution of \fB(\fP\fIstatement\fP ... \fB)\fP and restored to their
- original values afterwards.
- .nB
- \fB(\fP\fIstatement\fP ... \fB)\fP is executed as a subroutine, so that
- using \fB>>>RETURN<<<\fP inside will only leave this block and not
- the current function/macro. It is allowed to use a empty variable-list
- inside the \fB>>>LOC<<<\fP-statement. In this case, the statement can be
- used, to use \fB>>>RETURN<<<\fP as a kind of break!
- .Ib
- .\"}}}
- .\"{{{ >>>SHOW_CURSOR<<<
- .bI "\fB>>>SHOW_CURSOR<<<\fP \fIterm\fP"
- .dX >>>SHOW_CURSOR<<<
- The text cursor is displayed and Origami sleeps for \fIterm\fP/10
- seconds. \fIterm\fP is explained in the following chapter
- \fBVariables\fP.
- .Ib
- .\"}}}
- .\"{{{ origami-commands
- .bI "\fIorigami-command\fP"
- All Origami commands you can use from the keyboard can also be used by
- their names. \fB>>>O_BREAK<<<\fP stops the function/macro execution and calls
- the >>>DEFAB<<<, if it is defined.
- .Ib
- .\"}}}
- .\"{{{ macros and functions
- .bI "\fImacro-name\fP or \fIfunction-name\fP"
- All macros defined with \fB>>>DEFOP<<<\fP and all functions defined with
- \fB>>>INITMACRO<<<\fP can be used by their name. Functions defined with
- \fB>>>DEFMACRO<<<\fP or \fB>>>FORWARD<<<\fP can be used, if they do not need any
- arguments.
- .Ib
- .\"}}}
- .\"{{{ function( ... )
- .bI "\fIfunction-name\fP \fB(\fP \fIterm\fP ...\fB)\fP"
- .iX variable
- .iX term
- All functions defined with \fB>>>DEFMACRO<<<\fP or \fB>>>FORWARD<<<\fP can be
- used, if they need some arguments. The number of terms must fit the
- definition of \fIfunction-name\fP. \fIterm\fPs are explained below in
- chapter \fBVariables\fP.
- .Ib
- .\"}}}
- .\"{{{ hooks by their names
- .bI \fIhooks\fP
- If the corresponding hooks are already defined, you can use these names
- to call them (otherwise the statement has \fBno\fP effect):
- .sI \fB>>>B_CHG_MAC<<<\fP
- .Is
- .iX >>>B_CHG_MAC<<<
- .sI \fB>>>DEFAUTO<<<\fP
- .Is
- .iX >>>DEFAUTO<<<
- .sI \fB>>>DEFAB<<<\fP
- .Is
- .iX >>>DEFAB<<<
- .sI \fB>>>VMAC<<<\fP
- .Is
- .iX >>>VMAC<<<
- .sI \fB>>>PRO_IN<<<\fP
- .Is
- .iX >>>PRO_IN<<<
- .sI \fB>>>PRO_OUT<<<\fP
- .Is
- .iX >>>PRO_OUT<<<
- .sI \fB>>>KNBM<<<\fP
- .Is
- .iX >>>KNBM<<<
- .sI \fB>>>DEFAUTOSAVE<<<\fP
- .Is
- .iX >>>DEFAUTOSAVE<<<
- .sI \fB>>>DEFQUIT<<<\fP
- .Is
- .iX >>>DEFQUIT<<<
- .sI \fB>>>DEFU1<<<\fP
- .Is
- .iX >>>DEFU1<<<
- .sI \fB>>>DEFU2<<<\fP
- .Is
- .iX >>>DEFU2<<<
- .Ib
- .\"}}}
- .\"{{{ >>>INSERT_ASCII<<<
- .bI "\fB>>>INSERT_ASCII<<<\fP \fIorigami-message\fP"
- .dX >>>INSERT_ASCII<<<
- .iX origami-message
- Put the string for \fIorigami-message\fP in the text,
- where \fIorigami-message\fP can be one of the message names declared in
- the Origami sources, file >>>MSG_ENDING<<<.
- .Ib
- .\"}}}
- .\"{{{ strings
- .bI "\fIstrings\fP"
- Normal text can be used. The syntax is:
- .bI "\fB""\fP\fItext\fP"
- \fItext\fP can be a any string not containing <space>, \fB"\fP or \fB)\fP.
- .Ib
- .sI "\fB""\fP<space> to use <space>"
- .Is
- .sI "\fB"")\fP to use \fB)\fP"
- .Is
- .sI "\fB""""\fP to use \fB""\fP"
- .Is
- .wA
- if you use Origami to edit an OCL file, \fB"\fP<space> should not be the
- last statement of a line because Origami deletes all spaces at end of
- line. The problem can be circumvented by appending a comment to the
- line.
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ variables
- .\"{{{ types
- .nH 3 "Variables Types"
- .dX variable
- .LP
- OCL knows 3 types of variables:
- .\"{{{ global ints
- .nH 4 "global integer variables"
- .iX >>>DEFVAR<<<
- .LP
- These variables have to be declared with:
- .sI "\fB(>>>DEFVAR<<< (\fP\fIvariablename\fP .. \fB))\fP"
- .Is
- .dX >>>DEFVAR<<<
- .LP
- The following global integer variables are always predefined, their values
- are set by Origami automatically:
- .\"{{{ screen data
- .bI "\fB>>>SCR_H<<<\fP, \fB>>>SCR_W<<<\fP, \fB>>>CURSOR_LEVEL<<<\fP, \fB>>>SCR_W_O<<<\fP, \fB>>>SCR_H_O<<<\fP"
- .dX >>>SCR_H<<<
- .dX >>>SCR_H_O<<<
- .dX >>>SCR_W<<<
- .dX >>>SCR_W_O<<<
- .dX >>>CURSOR_LEVEL<<<
- The three OCL variables \fB>>>SCR_H<<<\fP, \fB>>>SCR_W<<<\fP and \fB>>>CURSOR_LEVEL<<<\fP are set
- to size of the text editing area of the current buffer on the screen and
- the number of the line, the cursor is in (top of buffer buffer window =
- 1). The variables \fB>>>SCR_W_O<<<\fP and \fB>>>SCR_H_O<<<\fP contain the offsets of
- the current buffer window on the screen.
- .Ib
- .\"}}}
- .\"{{{ buffer data
- .bI "\fB>>>C_B_VAR<<<\fP, \fB>>>C_BI_VAR<<<\fP, \fB>>>U_B_VAR<<<\fP, \fB>>>M_B_VAR<<<\fP"
- .iX buffer
- .dX >>>C_B_VAR<<<
- .dX >>>C_BI_VAR<<<
- .dX >>>U_B_VAR<<<
- .dX >>>M_B_VAR<<<
- The variable \fB>>>U_B_VAR<<<\fP shows the number of used buffers.
- .br
- \fB>>>C_B_VAR<<<\fP shows the number of the active (current) buffer. This
- number is not a fixed name, but represents the position of this buffer
- in the internal list of used buffers. It might change, if new buffers
- are opened or existing buffers are deleted!
- .br
- The OCL-variable \fB>>>C_BI_VAR<<<\fP contains a number, representing the
- creation time of the buffer. During the editing session, this will not
- change for a buffer.
- .br
- \fB>>>M_B_VAR<<<\fP contains the number of buffers, which are used to edit the
- file in the current buffer.
- .Ib
- .\"}}}
- .\"{{{ ocl-arguments
- .bI "\fB>>>OCL_ARG_V<<<\fP"
- .dX >>>OCL_ARG_V<<<
- .iX >>>O_SHELL_COMMAND<<<
- .iX >>>O_SHELL<<<
- .iX >>>O_FILTER_BUFFER<<<
- .iX >>>O_PIPE_TO_COMMAND<<<
- .iX >>>O_PIPE_FROM_COMMAND<<<
- .iX >>>O_FILE_C<<<
- .iX >>>O_D_AUTO_SAVE<<<
- .iX >>>O_D_TIME<<<
- .iX view-mode
- The OCL variable \fB>>>OCL_ARG_V<<<\fP can be set by using the command
- line option \fB\-O\fP\fIvalue\fP. This variable is also used, to store
- the exit status for \fB>>>O_SHELL_COMMAND<<<\fP, \fB>>>O_SHELL<<<\fP,
- \fB>>>O_FILTER_BUFFER<<<\fP, \fB>>>O_PIPE_TO_COMMAND<<<\fP and
- \fB>>>O_PIPE_FROM_COMMAND<<<\fP.
- \fB>>>O_FILE_C<<<\fP stores the number of added characters in it.
- \fB>>>O_D_TIME<<<\fP stores the old time mode in it.
- \fB>>>O_D_AUTO_SAVE<<<\fP returns information about the old auto save
- interval in this variable. \fB>>>OCL_ARG_V<<<\fP is set to the OCL
- command token, which cannot be executed while view mode is active.
- .Ib
- .\"}}}
- .\"{{{ >>>M_O_VAR<<<
- .bI "\fB>>>M_O_VAR<<<\fP"
- .dX >>>M_O_VAR<<<
- .iX >>>O_OPEN_BUFFER<<<
- .iX >>>O_OPEN_LIST_BUFFER<<<
- .iX >>>O_OPEN_W_BUFFER<<<
- .iX >>>O_OPEN_LIST_W_BUFFER<<<
- .iX >>>O_CREATE_FOLD<<<
- .iX >>>O_HELP<<<
- .iX >>>MESSAGE<<<
- .iX >>>O_REFRESH<<<
- .iX >>>O_A_AUTO_SAVE<<<
- .iX >>>O_DSP<<<
- \fB>>>M_O_VAR<<<\fP changes the semantics of Origami/OCL-functions:
- .TS
- tab(|);
- l l.
- command|modification/effect
- \fB>>>O_CREATE_FOLD<<<\fP|switch on highlighting mode
- \fB>>>O_OPEN_BUFFER<<<\fP|place/file
- \fB>>>O_OPEN_LIST_BUFFER<<<\fP|place/file
- \fB>>>O_OPEN_W_BUFFER<<<\fP|place/file
- \fB>>>O_OPEN_LIST_W_BUFFER<<<\fP|place/file
- \fB>>>O_HELP<<<\fP|show \fB@>>>STARTREF_NO<<<\fP help
- \fB>>>MESSAGE<<<\fP|print only in verbose mode
- \fB>>>O_REFRESH<<<\fP|screen invalid
- \fB>>>O_A_AUTO_SAVE<<<\fP|delay in seconds
- \fB>>>O_DSP<<<\fP|do not stay in menu
- .TE
- .Ib
- .\"}}}
- .\"{{{ >>>K_C_VAR<<<
- .bI "\fB>>>K_C_VAR<<<\fP"
- .dX >>>K_C_VAR<<<
- \fB>>>K_C_VAR<<<\fP contains the number of keyboard inputs, Origami read.
- .Ib
- .\"}}}
- .\"{{{ >>>KI_C_VAR<<<
- .bI "\fB>>>KI_C_VAR<<<\fP"
- .dX >>>KI_C_VAR<<<
- \fB>>>KI_C_VAR<<<\fP contains the number of lines, killed by
- \fB>>>O_PICK<<<\fP or \fB>>>O_COPY_PICK<<<\fP.
- .Ib
- .\"}}}
- .\"{{{ >>>M_C_VAR<<<
- .bI "\fB>>>M_C_VAR<<<\fP"
- .dX >>>M_C_VAR<<<
- \fB>>>M_C_VAR<<<\fP contains \fB0\fP or \fB1\fP, depending on the usage
- of the move-buffer.
- .Ib
- .\"}}}
- .\"{{{ >>>VAR_PATH_SEP<<<
- .bI "\fB>>>VAR_PATH_SEP<<<\fP"
- .dX >>>VAR_PATH_SEP<<<
- \fB>>>VAR_PATH_SEP<<<\fP is initialized at startup with the operations
- systems path separator (usually '\fB/\fP').
- .Ib
- .\"}}}
- .\"{{{ file-number
- .bI "\fB>>>F_N_VAR<<<\fP"
- .dX >>>F_N_VAR<<<
- \fB>>>F_N_VAR<<<\fP is set to the position of the current file in the list
- of edited files. The list of edited files uses \fB0\fP.
- .Ib
- .\"}}}
- .\"{{{ >>>DIRED_VAR<<<
- .bI "\fB>>>DIRED_VAR<<<\fP"
- .dX >>>DIRED_VAR<<<
- \fB>>>DIRED_VAR<<<\fP controls, whether directories are displayed using
- \fBdirfold \-l\fP.
- .Ib
- .\"}}}
- .\"{{{ >>>FORCE_SH<<<
- .bI "\fB>>>FORCE_SH<<<\fP"
- .dX >>>FORCE_SH<<<
- If \fB>>>FORCE_SH<<<\fP is not \fB0\fP, \fB>>>BOURNE_SHELL<<<\fP is used
- instead of the value of environment variable \fB>>>SHELL<<<\fP.
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ global integer arrays
- .nH 4 "global integer arrays"
- .iX >>>DEFVAR<<<
- .LP
- These also have to be declared with \fB>>>DEFVAR<<<\fP:
- .bI "\fB(>>>DEFVAR<<<\fP \fIdimension\fP \fB(\fP\fIvariablename\fP ... \fB))\fP"
- .dX >>>DEFVAR<<<
- All given \fIvariablename\fP are declared as fields of \fIdimension\fP
- integer variables. \fIdimension\fP is a non negative number constant.
- .Ib
- .LP
- The following array is always defined:
- .\"{{{ ocl-arg-field
- .bI "\fB>>>OCL_ARG_RECORD_V<<<\fP"
- .dX >>>OCL_ARG_RECORD_V<<<
- .iX >>>OCL_ARG_V<<<
- The OCL variable \fB>>>OCL_ARG_RECORD_V<<<\fP is defined with dimension
- >>>DIM_OCL_CMD_OPTS<<<. \fB>>>OCL_ARG_RECORD_V<<<(0)\fP and
- \fB>>>OCL_ARG_V<<<\fP are the same variable!
- \fB>>>OCL_ARG_RECORD_V<<<(\fP\fIx\fP\fB)\fP,0<\fIx\fP<>>>DIM_OCL_CMD_OPTS<<<
- are initialized with \fB0\fP, unless \fB\-O>\fP\fIx\fP is used to overwrite.
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ auto-vars
- .nH 4 "parameter variables"
- .iX >>>DEFMACRO<<<
- .LP
- Variables, declared as arguments for functions, are always local. Each
- function call will use another set of variables.
- .\"}}}
- .\"}}}
- .\"{{{ variable initialization
- .nH 3 "Variable Initialization"
- .LP
- The variables are known for all functions/macros. They are initialized
- by 0 at startup. The variable \fB>>>OCL_ARG_V<<<\fP is initialized with
- \fB\-1\fP, if no \fB\-O\fP option is given. Otherwise it is set as the
- \fB\-O\fP options determines:
- .\"{{{ <x copy from var
- .bI "\fB\-O\fP [\fB>\fP\fIoff\fP]<\fIvalue\fP"
- Change the value of OCL variable \fB>>>OCL_ARG_V<<<\fP to the one of
- \fB>>>OCL_ARG_RECORD_V<<<(\fP\fIvalue\fP.\fB)\fP. If \fB>\fP\fIoff\fP
- is used, change \fB>>>OCL_ARG_RECORD_V<<<(\fP\fIoff\fP\fB)\fP instead.
- .Ib
- .\"}}}
- .\"{{{ =x set to val
- .bI "\fB\-O\fP [\fB>\fP\fIoff\fP][\fB=\fP]\fIvalue\fP"
- Change the value of OCL variable \fB>>>OCL_ARG_V<<<\fP to \fIvalue\fP.
- If \fB>\fP\fIoff\fP is used, change
- \fB>>>OCL_ARG_RECORD_V<<<(\fP\fIoff\fP\fB)\fP instead.
- .Ib
- .\"}}}
- .\"{{{ |x or with val
- .bI "\fB\-O \fP[\fB>\fP\fIoff\fP]\fB|\fP\fIvalue\fP"
- Bitwise-Or the value of OCL variable \fB>>>OCL_ARG_V<<<\fP with
- \fIvalue\fP. If \fB>\fP\fIoff\fP is used, change
- \fB>>>OCL_ARG_RECORD_V<<<(\fP\fIoff\fP\fB)\fP instead.
- .Ib
- .\"}}}
- .\"{{{ &x and with val
- .bI "\fB\-O \fP[\fB>\fP\fIoff\fP]\fB&\fP\fIvalue\fP"
- Bitwise-And the value of OCL variable \fB>>>OCL_ARG_V<<<\fP with
- \fIvalue\fP. If \fB>\fP\fIoff\fP is used, change
- \fB>>>OCL_ARG_RECORD_V<<<(\fP\fIoff\fP\fB)\fP instead.
- .Ib
- .\"}}}
- .\"{{{ ^x xor with val
- .bI "\fB\-O \fP[\fB>\fP\fIoff\fP]\fB^\fP\fIvalue\fP"
- Bitwise-XOr the value of OCL variable \fB>>>OCL_ARG_V<<<\fP with
- \fIvalue\fP. If \fB>\fP\fIoff\fP is used, change
- \fB>>>OCL_ARG_RECORD_V<<<(\fP\fIoff\fP\fB)\fP instead.
- .Ib
- .\"}}}
- .\"{{{ +x add with val
- .bI "\fB\-O \fP[\fB>\fP\fIoff\fP]\fB+\fP\fIvalue\fP"
- Increment the value of OCL variable \fB>>>OCL_ARG_V<<<\fP with
- \fIvalue\fP. If \fB>\fP\fIoff\fP is used, change
- \fB>>>OCL_ARG_RECORD_V<<<(\fP\fIoff\fP\fB)\fP instead.
- .Ib
- .\"}}}
- .\"{{{ aliased
- .bI "\fB-O\fP \fIname\fP[\fB=\fP]\fInumber\fP"
- If \fIname\fP is defined as a command line alias in the current >>>RC_ENDING<<< file,
- the corresponding initialization will be done. If \fB=\fP\fInumber\fP is
- used, in the above mentioned options \fB?\fP can be used to replace
- \fIvalue\fP by the command line argument.
- .LP
- In aliased commands, you can use another command:
- .bI "\fB@\fP"
- .iX history
- .iX >>>ARG_HIST<<<
- .dX @
- A string given with \fB=\fP will be added to the predefined history
- \fB>>>ARG_HIST<<<\fP. A empty string will be stored as a single space.
- .Ib
- .Ib
- .\"}}}
- .wA
- there will be no compile time syntax check for the given aliases!
- .\"}}}
- .\"{{{ usage
- .nH 3 "Variables Usage"
- .dX variable
- .\"{{{ terms
- .nH 4 "Terms"
- .LP
- .dX term
- Variables can be used to build expressions. The syntax for these
- expressions, called \fIterm\fP in this document, is:
- .\"{{{ expr
- .dX +
- .dX \-
- .dX *
- .dX >>>DIV<<<
- .dX >>>MOD<<<
- .bI "\fIbasic\fP | \fB\-\fP\fIterm\fP | [\fB+\fP|\fB\-\fP|\fB*\fP|\fB>>>DIV<<<\fP|\fB>>>MOD<<<\fP]\fB(\fP\fIterm\fP \fIterm\fP [\fIterm\fP .. ] \fB)\fP"
- A \fIterm\fP can be a \fIbasic\fP term or a compound term.
- .Ib
- .\"}}}
- .LP
- OCL's \fIbasic\fP terms are:
- .\"{{{ true
- .bI \fB>>>TRUE_SYM<<<\fP
- .iX >>>TRUE_SYM<<<
- evaluates to 1.
- .Ib
- .\"}}}
- .\"{{{ false
- .bI \fB>>>FALSE_SYM<<<\fP
- .iX >>>FALSE_SYM<<<
- evaluates to 0.
- .Ib
- .\"}}}
- .\"{{{ number
- .bI "\fInumber\fP"
- a signed or unsigned integer constant.
- .Ib
- .\"}}}
- .\"{{{ char
- .hI
- \fB"\fP\fIchar\fP
- .br
- \fBC\-\fP\fIx\fP
- .tI
- the integer coding of the given character.
- .wA
- the \fB"\fP\fIchar\fP character is read as a string with length 1. So
- \fIchar\fP must be followed by a space!
- .eI
- .\"}}}
- .\"{{{ name
- .bI "\fIname\fP"
- a variable
- .Ib
- .\"}}}
- .\"{{{ name(x)
- .bI "\fIname (\fP \fIterm\fP \fB)\fP"
- the \fIterm\fP's entry in array \fIname\fP (index: 0,1,.. )
- .Ib
- .\"}}}
- .\"{{{ >>>EVAL<<<
- .bI "\fB>>>EVAL<<< (\fP\fIstatement\fP ... \fB)\fP"
- .dX >>>EVAL<<<
- .iX >>>RETVAL<<<
- "\fB(\fP\fIstatement\fP ... \fB)\fP" is called via subroutine call. If
- it is ended with "\fB>>>RETVAL<<<\fP \fIterm\fP", this value
- is used. Otherwise a random value is used as result of this expression.
- .Ib
- .\"}}}
- .\"{{{ >>>PRE<<<
- .bI "\fB>>>PRE<<< (\fP\fIstatement\fP ... \fB)\fP \fIterm\fP"
- .dX >>>PRE<<<
- execute \fB(\fP\fIstatement\fP ... \fB)\fP and use the new values in
- the evaluation of \fIterm\fP.
- .Ib
- .\"}}}
- .\"{{{ >>>COUNTER<<<
- .bI "\fB>>>COUNTER<<<\fP \fIcondition\fP"
- .dX >>>COUNTER<<<
- is 1, if the boolean expression evaluates to TRUE, otherwise 0.
- .Ib
- .\"}}}
- .\"{{{ >>>READ_REPEAT<<<
- .bI "\fB>>>READ_REPEAT<<<\fP"
- .dX >>>READ_REPEAT<<<
- .iX argument
- .iX set-argument
- Return the value accumulated by \fBset-argument-x\fP. The repeated
- execution of the command will be stopped. If \fBset-argument-x\fP was not used,
- \fB\-1\fP will be returned.
- .Ib
- .\"}}}
- .\"{{{ >>>STORE_CHAR<<<
- .bI "\fB>>>STORE_CHAR<<<\fP"
- .dX >>>STORE_CHAR<<<
- Return the ASCII value of the character under the cursor.
- .Ib
- .\"}}}
- .\"{{{ >>>FOLD_SL<<<
- .bI \fB>>>FOLD_SL<<<\fP
- .dX >>>FOLD_SL<<<
- Returns the length of the fold comment start string (2, if language
- \fB>>>LANG_Inmos<<<\fP is active).
- .Ib
- .\"}}}
- .\"{{{ >>>FOLD_S<<<
- .bI "\fB>>>FOLD_S<<<\fP \fIterm\fP"
- .dX >>>FOLD_S<<<
- Returns the \fIterm\fPs character of the fold comment start string
- (which is replaced by '\fB--\fP', if language >>>LANG_Inmos<<< is active). 0 is the
- first character.
- .Ib
- .\"}}}
- .\"{{{ >>>FOLD_EL<<<
- .bI \fB>>>FOLD_EL<<<\fP
- .dX >>>FOLD_EL<<<
- Returns the length of the fold comment end string (0, if language
- \fB>>>LANG_Inmos<<<\fP is active).
- .Ib
- .\"}}}
- .\"{{{ >>>FOLD_E<<<
- .bI "\fB>>>FOLD_E<<<\fP \fIterm\fP"
- .dX >>>FOLD_E<<<
- Returns the \fIterm\fPs character of the fold comment end string
- (which is replaced by '\fB\fP', if language >>>LANG_Inmos<<< is active). 0 is the
- first character.
- .Ib
- .\"}}}
- .\"{{{ >>>FOLD_M1<<<...
- .hI
- \fB>>>FOLD_M1<<<\fP \fIterm\fP
- .br
- \fB>>>FOLD_M2<<<\fP \fIterm\fP
- .br
- \fB>>>FOLD_M3<<<\fP \fIterm\fP
- .br
- \fB>>>FOLD_M4<<<\fP \fIterm\fP
- .tI
- .dX >>>FOLD_M1<<<
- .dX >>>FOLD_M2<<<
- .dX >>>FOLD_M3<<<
- .dX >>>FOLD_M4<<<
- Like \fB>>>FOLD_S<<<\fP, but uses the fold mark strings.
- .eI
- .\"}}}
- .\"{{{ >>>FILETYPE<<<
- .bI "\fB>>>FILETYPE<<<\fP"
- .dX >>>FILETYPE<<<
- Return a coding for the type of the current editor file.
- .sI "0 for regular file"
- .Is
- .sI "1 for directory"
- .Is
- .sI "\-1 for list of edited files"
- .Is
- .Ib
- .\"}}}
- .\"{{{ >>>SET_ENTER<<<
- .bI "\fB>>>SET_ENTER<<<\fP"
- .dX >>>SET_ENTER<<<
- Return number of entered folds.
- .Ib
- .\"}}}
- .\"{{{ >>>SET_S_ENTER<<<
- .bI "\fB>>>SET_S_ENTER<<<\fP"
- .dX >>>SET_S_ENTER<<<
- Return the number of leading spaces hidden by entering folds.
- .Ib
- .\"}}}
- .\"{{{ >>>STORE_Y<<<
- .bI "\fB>>>STORE_Y<<<\fP"
- .dX >>>STORE_Y<<<
- Return the current line number.
- .Ib
- .\"}}}
- .\"{{{ >>>STORE_X<<<
- .bI "\fB>>>STORE_X<<<\fP"
- .dX >>>STORE_X<<<
- Return the x-position of the cursor. 1 is first displayed character.
- This may be not the first character on that text line if you have
- entered indented folds.
- .Ib
- .\"}}}
- .\"{{{ >>>DECODE_BUFFER<<<
- .bI "\fB>>>DECODE_BUFFER<<<\fP \fIterm-x term-y\fP"
- .dX >>>DECODE_BUFFER<<<
- Return the buffer number, using the screen position (not buffer
- position) \fIterm-x\fP/\fIterm-y\fP. If the position does not belong to
- a buffer, 0 is returned.
- .Ib
- .\"}}}
- .\"{{{ >>>STORE_MARK<<<
- .bI "\fB>>>STORE_MARK<<<\fP"
- .dX >>>STORE_MARK<<<
- .iX >>>GOTO_MARK<<<
- Return a coding of the current line. \fB>>>GOTO_MARK<<<\fP can use this
- value to reach the line, even if the line has been moved in the text.
- .Ib
- .\"}}}
- .\"{{{ origami commands
- .bI "\fBorigami functions\fP"
- All Origami commands can be used in terms. This is used to set variables
- with values used in \fB>>>INSERT_ASCII<<<\fP.
- .Ib
- .\"}}}
- .LP
- \fIop\fP\fB(\fP\fIe1 e2 e3\fP .. \fB)\fP is evaluated like
- \fIop\fP\fB(\fP\fIop\fP\fB(\fP\fIe1 e2\fP\fB)\fP \fIe3\fP .. \fB)\fP.
- .wA
- The code optimizer (option \fB\-O\fP) modifies only the generated
- OCL-assembler. It cannot optimize the structure of terms! Play with
- the expressions and use \fBviewrc\fP if you need fast/short
- functions/macros.
- .\"}}}
- .\"{{{ statements
- .nH 4 "Variable statements"
- .LP
- The following functions deal with variables/terms and can be used in the
- same way like the above mentioned statements:
- .\"{{{ >>>PROMPT_COUNTER<<<
- .bI "\fB>>>PROMPT_COUNTER<<<\fP \fIname message-string\fP"
- .iX message-string
- .dX >>>PROMPT_COUNTER<<<
- Prompts \fImessage-string\fP below the status line and reads the new value for
- \fIname\fP from keyboard. Input \fIy\fP sets it to 1, \fIn\fP sets it
- to 0. All other inputs have to be decimals or a simple
- >>>O_RETURN<<<.
- .nB
- This command does not support the full editing possibilities, you can
- use with normal prompts. Only the following commands are allowed:
- .iX >>>O_DELETE<<<
- .iX >>>O_RETURN<<<
- .TS
- tab(|);
- l.
- \fB>>>O_DELETE<<<\fP
- \fB>>>O_RETURN<<<\fP
- normal text characters
- .TE
- .pM \fB>>>PROMPT_COUNTER<<<\fP
- .Ib
- .\"}}}
- .\"{{{ >>>PROMPT_CHAR<<<
- .bI "\fB>>>PROMPT_CHAR<<<\fP \fIname message-string\fP"
- .iX message-string
- .dX >>>PROMPT_CHAR<<<
- Same as \fB>>>PROMPT_COUNTER<<<\fP, but the counter \fIname\fP is set to the
- ASCII-value of the next pressed key. The value is undefined, if the
- pressed key is bound to a user defined or predefined function. The
- given input will \fB>>>NOT<<<\fP be interpreted. So a given function will not
- be executed!
- .pM \fB>>>PROMPT_CHAR<<<\fP
- .Ib
- .\"}}}
- .\"{{{ >>>MENU<<<
- .bI "\fB>>>MENU<<<\fP \fIname message-string\fP"
- .iX message-string
- .dX >>>MENU<<<
- Display \fImessage-string\fP as a menu and ask for the whished item.
- Items are the space separated textparts in \fImessage-string\fP. You
- can choose the items by typing the first character or by moving with
- \fB>>>O_LEFT<<<\fP and \fB>>>O_RIGHT<<<\fP. The currently chosen item is
- displayed inverse (or trailing \fB>>>CURR_MARK<<<\fP, if inverse is not
- possible). The first chosen item is given by \fIname\fP (or 0, if
- \fIname\fP is not in the correct range). \fIname\fP is set to the
- number of the chosen item (0..).
- .LP
- Leading spaces in front of the prompt will be cut. \fImessage-string\fP
- may not use characters, which are displayed with more than one character
- on the screen (ctrl-chars and tab)! If the first character of an item
- is \fB>>>SPACE_CHAR<<<\fP, it will be replaced by \fB>>>SPACE<<<\fP in the
- menu and the item asks for the space-character. If the menu string is
- to long for the current screen, it will be cut at the left and/or right
- end and marked as a long edit line.
- .pM \fB>>>MENU<<<\fP
- .Ib
- .\"}}}
- .\"{{{ >>>GOTO_BUFFER<<<
- .bI "\fB>>>GOTO_BUFFER<<<\fP \fIterm\fP"
- .dX >>>GOTO_BUFFER<<<
- .iX buffer
- .iX >>>C_B_VAR<<<
- Switch to buffer \fIterm\fP in the list of used buffers, the first one
- is 1. Uses the order from \fB>>>C_B_VAR<<<\fP.
- .Ib
- .\"}}}
- .\"{{{ >>>GOTO_BUFFER_ID<<<
- .bI "\fB>>>GOTO_BUFFER_ID<<<\fP \fIterm\fP"
- .dX >>>GOTO_BUFFER_ID<<<
- .iX buffer
- .iX >>>C_BI_VAR<<<
- Switch to the buffer with \fB>>>C_BI_VAR<<<\fP is \fIterm\fP. The first one is 0.
- .Ib
- .\"}}}
- .\"{{{ >>>GOTO_COUNTER<<<
- .bI "\fB>>>GOTO_COUNTER<<<\fP \fIterm\fP"
- .dX >>>GOTO_COUNTER<<<
- Move the cursor on x-position \fIterm\fP. 1 is the first displayed
- character. If you enter a indented fold, position 1 is not the first
- character on that line.
- .Ib
- .\"}}}
- .\"{{{ goto-counter
- .bI "\fBgoto-counter\fP \fIterm\fP"
- .dX goto-counter
- Same as above.
- .Ib
- .\"}}}
- .\"{{{ >>>GOTO_Y<<<
- .bI "\fB>>>GOTO_Y<<<\fP \fIterm\fP"
- .dX >>>GOTO_Y<<<
- Like \fB>>>O_GOTO_LINE<<<\fP. The line number is the value of the expression.
- .wA
- Origami exits entered folds and moves to the given position.
- .lC
- .Ib
- .\"}}}
- .\"{{{ >>>GOTO_MARK<<<
- .bI "\fB>>>GOTO_MARK<<<\fP \fIterm\fP"
- .dX >>>GOTO_MARK<<<
- .iX >>>GOTO_Y<<<
- .iX >>>STORE_MARK<<<
- .iX >>>M_O_VAR<<<
- Like \fB>>>GOTO_Y<<<\fP, but uses the line coding, given by a
- \fB>>>STORE_MARK<<<\fP statement, to reach the line directly. The line
- will be found, even if it has been moved inside the text. Invalid codes
- will be handled as if the last line has been marked.
- .LP
- If OCL varoable \fB>>>M_O_VAR<<<\fP is not \fB0\fP, and the cursor is on
- the destination line, the command will be ignored!
- .wA
- Origami exits entered folds and moves to the given position.
- .wA
- While a marked line is inside \fBkill\-\fP, \fBmove\-\fP or
- \fBdelete\-buffer\fP, the mark is invalid. At the time, these lines
- appear in the text again, the marks become valid again.
- .wA
- Due to memory management of origami and its reusage of memory, the
- handling of marks in the following circumstances is not defined (invalid
- marks or marks to random lines!):
- .sI "changing the edit file of an buffer"
- .Is
- .sI "deleting more than >>>UNDEL_LINES<<< lines, and creating new text lines"
- .Is
- .lC
- .Ib
- .\"}}}
- .\"{{{ >>>COUNTER<<<
- .bI "\fB>>>COUNTER<<<\fP \fIterm\fP"
- .dX >>>COUNTER<<<
- The value of the expression is returned as ASCII-text.
- .Ib
- .\"}}}
- .\"{{{ >>>INSERT_ASCII<<<
- .bI "\fB>>>INSERT_ASCII<<<\fP \fIterm\fP"
- .dX >>>INSERT_ASCII<<<
- Insert the character with ASCII-code given by the expression into the
- input stream. There is no check whether the given value of name is a
- correct ascii value. Do it yourself!
- .LP
- This command can also be used, to put internal OCL-tokens into the token
- stream. This should only used by experienced OCL programmers! Using
- invalid tokens can crash Origami!
- .Ib
- .\"}}}
- .\"{{{ >>>SET_COUNTER<<< var
- .bI "\fB>>>SET_COUNTER<<<\fP \fIname term\fP"
- .dX >>>SET_COUNTER<<<
- The counter-variable \fIname\fP is set to the value of \fIterm\fP.
- .nB
- .dX set-counter
- the old name \fBset-counter\fP is also valid for compatibility reasons.
- .Ib
- .\"}}}
- .\"{{{ >>>SET_COUNTER<<< array
- .bI "\fB>>>SET_COUNTER<<<\fP \fIname\fP \fB(\fP \fIterm1\fP \fB)\fP \fIterm2\fP"
- .dX >>>SET_COUNTER<<<
- The entry \fIterm1\fP of array \fIname\fP is set to the value of
- \fIterm2\fP.
- .nB
- .dX set-counter
- the old name \fBset-counter\fP is also valid for compatibility reasons.
- .Ib
- .\"}}}
- .\"{{{ >>>SET_CURSOR<<<
- .bI "\fB>>>SET_CURSOR<<<\fP \fIterm\fP"
- .dX >>>SET_CURSOR<<<
- Like \fB>>>O_FLUSH<<<\fP, but uses line \fIterm\fP instead of the
- current line.
- .Ib
- .\"}}}
- .\"{{{ >>>RETVAL<<<
- .bI "\fB>>>RETVAL<<<\fP \fIterm\fP"
- .dX >>>RETVAL<<<
- .iX >>>RETURN<<<
- .iX >>>EVAL<<<
- Like \fB>>>RETURN<<<\fP, but a calling \fB>>>EVAL<<<\fP statement can use
- \fIterm\fP as result.
- .Ib
- .\"}}}
- .\"{{{ >>>CHANGE_FOLD<<<
- .bI "\fB>>>CHANGE_FOLD<<<\fP \fIterm term\fP"
- .dX >>>CHANGE_FOLD<<<
- Uses the first \fIterm\fP as foldtype and the second as fold contents and
- changes the attributes of the fold under the cursor. These values have
- specific meanings in TDS! The values of the \fIterm\fPs are used modulo
- 255.
- .Ib
- .\"}}}
- .\"{{{ >>>EXITCODE<<<
- .bI "\fB>>>EXITCODE<<<\fP \fIname message-string\fP"
- .iX message-string
- .dX >>>EXITCODE<<<
- Like \fB>>>O_FINISH<<<\fP, but uses value of OCL-variable
- \fIname\fP as exit code. \fImessage-string\fP is displayed as exit-message.
- .Ib
- .\"}}}
- .\"}}}
- .\"}}}
- .\"}}}
- .\"{{{ character sets
- .nH 3 "Character sets"
- .LP
- .dX "character set"
- In OCL you can use character sets to simplify boolean expressions.
- Predefined character sets are:
- .\"{{{ table of predefined sets
- .nI
- .ne 5
- .TS
- tab(|);
- l l.
- \fB>>>ALPHA_STR<<<\fP|letters \fBa\fP..\fBz\fP,\fBA\fP..\fBZ\fP
- \fB>>>UPPER_STR<<<\fP|uppercase letters \fBA\fP..\fBZ\fP
- \fB>>>LOWER_STR<<<\fP|lowercase letters \fBa\fP..\fBz\fP
- \fB>>>DIGIT_STR<<<\fP|digits \fB0\fP..\fB9\fP
- \fB>>>XDIGIT_STR<<<\fP|\fB>>>DIGIT_STR<<<\fP and letters \fBa\fP..\fBf\fP,\fBA\fP..\fBF\fP
- \fB>>>ALNUM_STR<<<\fP|\fB>>>ALPHA_STR<<<\fP and \fB>>>DIGIT_STR<<<\fP
- \fB>>>BLANK_STR<<<\fP|space or tab
- \fB>>>SPACE_STR<<<\fP|characters generating whitespace
- \fB>>>PRINT_STR<<<\fP|printing character
- \fB>>>CNTRL_STR<<<\fP|control keys 0 .. 31 and delete key 127
- \fB>>>GRAPH_STR<<<\fP|not space character
- \fB>>>PUNCT_STR<<<\fP|punctation character: not \fB>>>ALNUM_STR<<<\fP, \fB>>>DIGIT_STR<<<\fP or \fB>>>SPACE_STR<<<\fP
- .TE
- .In
- .\"}}}
- .nB
- see in your local '\fBctype\fP' documentation for detailed information.
- .LP
- You can define your own sets with:
- .\"{{{ >>>DEFSET<<<
- .bI "\fB(>>>DEFSET<<<\fP \fIname\fP \fB(\fP \fIelement\fP ... \fB))\fP"
- .dX >>>DEFSET<<<
- The character set name is declared. Elements are all characters given
- in the \fIelement\fP-list. \fIelement\fP can be:
- .nI
- .ne 3
- .TS
- tab(|);
- l l.
- \fIname\fP|the name of a known character set
- \fB"\fP\fIx\fP|a normal character
- \fBC\-\fP\fIx\fP|a control character
- .TE
- .In
- .Ib
- .\"}}}
- Inside functions/macros you can use \fB>>>DEFSET<<<\fP as Origami function:
- .\"{{{ >>>DEFSET<<< inside macros
- .bI "\fB>>>DEFSET<<<\fP \fIdest source\fP"
- .dX >>>DEFSET<<<
- The value of set \fIdest\fP is overwritten by the set \fIsource\fP.
- \fIdest\fP has to be a user-defined set. The predefined sets cannot be
- redefined.
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ boolean expressions
- .nH 3 "Boolean expressions"
- .LP
- The boolean expressions \fIcondition\fP mentioned above can be:
- .\"{{{ boolean basicfunctions
- .iX boolean basics
- .\"{{{ >>>TRUE_SYM<<<
- .sI \fB>>>TRUE_SYM<<<\fP"
- .Is
- .dX >>>TRUE_SYM<<<
- .\"}}}
- .\"{{{ >>>FALSE_SYM<<<
- .sI \fB>>>FALSE_SYM<<<\fP"
- .Is
- .dX >>>FALSE_SYM<<<
- .\"}}}
- .\"{{{ >>>LASTMES<<<
- .bI "\fB>>>LASTMES<<<\fP \fImessage-name\fP"
- .dX >>>LASTMES<<<
- Is true if the last message created by a string from file >>>MSG_ENDING<<< in the
- Origami source directory was \fImessage-name\fP. A successful test will
- set the last displayed message to a dummy value, so that
- \fB>>>LASTMES<<<\fP \fIx\fP will be false until a new message is
- displayed. Using Origami-messages in prompts changes the last displayed
- message. The appendix contains the list of known messages.
- .Ib
- .\"}}}
- .\"{{{ >>>TEST_CHANGED<<<
- .bI "\fB>>>TEST_CHANGED<<<\fP"
- .dX >>>TEST_CHANGED<<<
- Is true if the current file has been changed.
- .Ib
- .\"}}}
- .\"{{{ >>>TEST_FILED<<<
- .bI "\fB>>>TEST_FILED<<<\fP"
- .dX >>>TEST_FILED<<<
- Is true if the current line is a file-folded-line.
- .Ib
- .\"}}}
- .\"{{{ >>>TEST_FOLD_LINE<<<
- .bI "\fB>>>TEST_FOLD_LINE<<<\fP"
- .dX >>>TEST_FOLD_LINE<<<
- Is true if the current line is a closed-fold-line.
- .Ib
- .\"}}}
- .\"{{{ >>>TEST_BEGIN_FOLD<<<
- .bI "\fB>>>TEST_BEGIN_FOLD<<<\fP"
- .dX >>>TEST_BEGIN_FOLD<<<
- Is true if the current line is the {\&{\&{ line of a open fold.
- .Ib
- .\"}}}
- .\"{{{ >>>TEST_END_FOLD<<<
- .bI "\fB>>>TEST_END_FOLD<<<\fP"
- .dX >>>TEST_END_FOLD<<<
- Is true if the current line is the }\&}\&} line of a open fold.
- .Ib
- .\"}}}
- .\"{{{ >>>TEST_TEXT<<<
- .bI "\fB>>>TEST_TEXT<<<\fP"
- .dX >>>TEST_TEXT<<<
- Is true if the current line is a normal text-line.
- .Ib
- .\"}}}
- .\"{{{ >>>TEST_TOP<<<
- .bI "\fB>>>TEST_TOP<<<\fP"
- .dX >>>TEST_TOP<<<
- Is true if the current line is the top of the entered fold.
- .Ib
- .\"}}}
- .\"{{{ >>>TEST_BOTTOM<<<
- .bI "\fB>>>TEST_BOTTOM<<<\fP"
- .dX >>>TEST_BOTTOM<<<
- Is true if the current line is the bottom of the entered fold.
- .Ib
- .\"}}}
- .\"{{{ >>>TEST_CHAR_C<<<
- .bI "\fB>>>TEST_CHAR_C<<<\fP \fIterm\fP"
- .dX >>>TEST_CHAR_C<<<
- Is true if the ASCII-value of the character under the cursor is equal to
- value of the expression.
- .Ib
- .\"}}}
- .\"{{{ >>>TEST_CHAR_LOW_C<<<
- .bI "\fB>>>TEST_CHAR_LOW_C<<<\fP \fIterm\fP"
- .dX >>>TEST_CHAR_LOW_C<<<
- Is true if the ASCII-value of the character under the cursor is less
- than the value of the expression.
- .Ib
- .\"}}}
- .\"{{{ >>>TEST_CHAR_HIGH_C<<<
- .bI "\fB>>>TEST_CHAR_HIGH_C<<<\fP \fIterm\fP"
- .dX >>>TEST_CHAR_HIGH_C<<<
- Is true if the ASCII-value of the character under the cursor is greater
- than the value of the expression.
- .Ib
- .\"}}}
- .\"{{{ >>>TEST_CHAR_SET<<<
- .bI "\fB>>>TEST_CHAR_SET<<<\fP \fIname\fP"
- .dX >>>TEST_CHAR_SET<<<
- Is true if the character under the cursor is in the given character set
- \fIname\fP.
- .Ib
- .\"}}}
- .\"{{{ >>>TEST_STR<<<
- .bI "\fB>>>TEST_STR<<<\fP \fImessage-string\fP"
- .dX >>>TEST_STR<<<
- Is true if the string, beginning at the cursor and \fImessage-string\fP are the
- same.
- .Ib
- .\"}}}
- .\"{{{ >>>TEST_LANG<<<
- .hI
- \fB>>>TEST_LANG<<< "\fP\fIx\fP
- .br
- \fB>>>TEST_LANG<<< \fP\fIlanguage-name\fP
- .tI
- .dX >>>TEST_LANG<<<
- .iX language
- Is true if \fIx\fP is the language used by \fB>>>O_LANGUAGE<<<\fP. Instead
- of the single character '\fIx\fP', you can use the language names, like
- given in chapter \fBProcessing Origami Files\fP.
- .iX "Processing Origami Files"
- .eI
- .\"}}}
- .\"{{{ relop
- .dX <
- .dX <=
- .dX =
- .dX <>
- .dX >=
- .dX >
- .bI "[\fB<\fP|\fB<=\fP|\fB=\fP|\fB<>\fP|\fB>=\fP|\fB>\fP]\fB(\fP \fIterm1\fP .. \fItermN\fP \fB)\fP"
- Is true, if \fItermI OP termI+1\fP is true for all I=1..N-1. No term is
- evaluated more than once. If \fItermI OP termI+1\fP is false for I, the
- following terms are not evaluated.
- .Ib
- .\"}}}
- .\"{{{ >>>TEST_BEGIN_LINE<<<
- .bI "\fB>>>TEST_BEGIN_LINE<<<\fP"
- .dX >>>TEST_BEGIN_LINE<<<
- Is true if the cursor is placed on or before the first non-space-character
- of the current line.
- .Ib
- .\"}}}
- .\"{{{ >>>TEST_END_LINE<<<
- .bI "\fB>>>TEST_END_LINE<<<\fP"
- .dX >>>TEST_END_LINE<<<
- Is true if the cursor is placed behind the last non-space-character of the
- current line.
- .Ib
- .\"}}}
- .\"{{{ >>>EDITING<<<
- .bI "\fB>>>EDITING<<<\fP"
- .dX >>>EDITING<<<
- Is true if Origami is not waiting for a normal edit-character (for
- example when prompting for a filename).
- .Ib
- .\"}}}
- .\"{{{ >>>TEST_GEN_FOLD<<<
- .bI "\fB>>>TEST_GEN_FOLD<<<\fP"
- .dX >>>TEST_GEN_FOLD<<<
- .iX >>>M_O_VAR<<<
- .iX >>>OCL_ARG_V<<<
- .iX >>>O_CREATE_FOLD<<<
- Is true, if Origami is in create-fold or highlight mode. The OCL
- variable \fB>>>OCL_ARG_V<<<\fP is set to the value of \fB>>>M_O_VAR<<<\fP at
- \fB>>>O_CREATE_FOLD<<<\fP call.
- .Ib
- .\"}}}
- .\"{{{ >>>TEST_OVER<<<
- .bI "\fB>>>TEST_OVER<<<\fP"
- .dX >>>TEST_OVER<<<
- .iX overwrite-mode
- Is true if Origami is in overwrite-mode.
- .Ib
- .\"}}}
- .\"{{{ >>>TEST_HASH<<<
- .bI "\fB>>>TEST_HASH<<<\fP"
- .dX >>>TEST_HASH<<<
- .iX hash-shift-mode
- Is true if Origami is in \fBhash-shift\fP mode.
- .Ib
- .\"}}}
- .\"{{{ >>>TEST_AUTO<<<
- .bI "\fB>>>TEST_AUTO<<<\fP"
- .dX >>>TEST_AUTO<<<
- .iX autosave-mode
- .iX >>>DEFAUTOSAVE<<<
- Is true if Origami is in autosave-mode.
- .Ib
- .\"}}}
- .\"{{{ >>>TEST_ECHO<<<
- .bI "\fB>>>TEST_ECHO<<<\fP"
- .dX >>>TEST_ECHO<<<
- Is true if Origami is in echo-mode.
- .Ib
- .\"}}}
- .\"{{{ >>>TEST_VIEW<<<
- .bI "\fB>>>TEST_VIEW<<<\fP"
- .dX >>>TEST_VIEW<<<
- .iX view-mode
- Is true if Origami is in view-mode.
- .Ib
- .\"}}}
- .\"{{{ >>>TEST_VERBOSE<<<
- .bI "\fB>>>TEST_VERBOSE<<<\fP"
- .dX >>>TEST_VERBOSE<<<
- .iX verbose
- Is true if Origami is in verbose-mode.
- .Ib
- .\"}}}
- .\"{{{ >>>TEST_TERM<<<
- .bI "\fB>>>TEST_TERM<<<\fP [\fB(\fP] \fIterminal-name\fP [ ... \fB)\fP"
- .dX >>>TEST_TERM<<<
- .iX terminal
- .iX message-string
- Is true, if environment variable \fB>>>TERM<<<\fP is set to one of the
- given \fIterminal-name\fPs. \fIterminal-name\fP can be given as
- identifier or string (with leading \fB"\fP.). If \fIterminal-name\fP
- end with a \fB*\fP, the test is true, if \fBTERM\fP starts with
- \fIterminal-name\fP, without the \fB*\fP. The empty list evaluated to
- \fBFALSE\fP.
- .Ib
- .\"}}}
- .\"{{{ term
- .bI "\fIterm\fP"
- .iX term
- Is true if the given expression evaluates to non-zero.
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ boolean operators
- .\"{{{ >>>PRE<<<
- .bI "\fB>>>PRE<<< (\fP\fIstatement\fP ... \fB)\fP \fIcondition\fP"
- .dX >>>PRE<<<
- The sequence of \fIstatement\fP will be executed before the evaluation
- of \fIcondition\fP.
- .Ib
- .\"}}}
- .\"{{{ >>>NOT<<<
- .bI "\fB>>>NOT<<<(\fP\fIcondition\fP\fI)\fP"
- .dX >>>NOT<<<
- The value of \fIcondition\fP is logically negated.
- .Ib
- .\"}}}
- .\"{{{ >>>AND<<<
- .bI "\fB>>>AND<<<(\fP\fIcondition\fP [ \fIcondition\fP ... ] \fB)\fP"
- .dX >>>AND<<<
- Is true if all \fIcondition\fPs are true.
- .Ib
- .\"}}}
- .\"{{{ >>>OR<<<
- .bI "\fB>>>OR<<<(\fP\fIcondition\fP [ \fIcondition\fP ... ] \fB)\fP"
- .dX >>>OR<<<
- Is true if one of the \fIcondition\fPs is true.
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ comments
- .nB
- OCL uses short-circuit evaluation for \fB>>>AND<<<\fP and \fB>>>OR<<<\fP. When
- Origami is prompting for information (for example, asking to overwrite
- an existing file during \fBtoggle-create-file-fold\fP), you can just use
- the part of OCL also allowed in >>>PRO_IN<<< and >>>PRO_OUT<<<.
- For historical reasons it is allowed to use delimiters \fB,\fP in the
- expression lists for \fB>>>AND<<<\fP and \fB>>>OR<<<\fP.
- .\"}}}
- .\"}}}
- .\"{{{ area
- .nH 3 "The display area"
- .LP
- .iX area
- .iX "display area"
- Origami can use a part of the screen to continuously display a text in
- the same manner as the status line. This area cannot be edited with the
- normal editing commands. The text appears below the status line if it
- is enabled, with the last line highlighted. Otherwise the text appears
- below the editing area. Controlling this text display area is
- restricted to the following OCL statements:
- .\"{{{ >>>HELP_SET<<<
- .bI "\fB>>>HELP_SET<<<\fP \fIterm\fP"
- .dX >>>HELP_SET<<<
- The OCL expression is used to set the size of the new area. If its value
- is 0, no text area will be displayed. Otherwise the value determines the
- number of lines in the new and empty text area.
- .Ib
- .\"}}}
- .\"{{{ >>>HELP_W<<<
- .bI "\fB>>>HELP_W<<<\fP \fIvariable variable message-string\fP"
- .iX message-string
- .dX >>>HELP_W<<<
- Origami uses the variables as x- / y position where to write the
- string \fImessage-string\fP.
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ modes
- .nH 3 "User defined modes"
- .LP
- .iX modes
- In addition to the predefined modes you can define up to >>>MODE_COUNT<<< new pairs
- of strings which can be displayed as modes in the status line:
- .\"{{{ >>>DEFMODE<<<
- .bI "\fB(>>>DEFMODE<<<\fP \fIname longstring shortstring\fP\fB)\fP"
- .dX >>>DEFMODE<<<
- .iX "long statusline"
- .iX statusline
- \fIname\fP is a new mode. \fIlongstring\fP is displayed in the status
- line when the mode is active. If the status line becomes to long,
- \fIshortstring\fP is used. \fIlongstring\fP and \fIshortstring\fP are
- normal strings (length is limited by >>>BIND_NAME_LEN<<<). \fIname\fP is a normal
- identifier.
- .Ib
- .\"}}}
- .LP
- Usermodes are controlled by the following Origami commands. They can be
- used as normal Origami commands in every \fB(>>>DEFMACRO<<< \fP\&.\&.\&.\fB )\fP,
- \fB(>>>INITMACRO<<< \fP\&.\&.\&.\fB )\fP and \fB(>>>DEFOP<<< \fP\&.\&.\&.\fB )\fP.
- .\"{{{ >>>SET_U_M_N<<<
- .bI "\fB>>>SET_U_M_N<<<\fP \fIname term\fP"
- .dX >>>SET_U_M_N<<<
- Usermode \fIname\fP is activated. At this point, \fIname\fP must be
- defined as usermode! If \fIterm\fP does not evaluate to 0, this value
- will be displayed after the mode string.
- .Ib
- .\"}}}
- .\"{{{ >>>SET_U_M<<<
- .bI "\fB>>>SET_U_M<<<\fP \fIname\fP"
- .dX >>>SET_U_M<<<
- Usermode \fIname\fP is activated. At this point, \fIname\fP must be
- defined as user mode!
- .Ib
- .\"}}}
- .\"{{{ >>>RESET_U_M<<<
- .bI "\fB>>>RESET_U_M<<<\fP \fIname\fP"
- .dX >>>RESET_U_M<<<
- Usermode \fIname\fP is reset. At this point, \fIname\fP must be defined
- as user mode!
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ multiple keyboards
- .nH 3 "Multiple keyboard modes"
- .\"{{{ declaration
- .LP
- .iX keyboards
- To create more complex keybindings (for example a \fBvi\fP emulation
- with modes), OCL offers the possibility to use different keyboard
- translation tables. To do this, you must declare the used key tables
- with:
- .\"{{{ >>>MULTIKBD<<<
- .bI "\fB(>>>MULTIKBD<<< (\fP\fIname\fP ... \fB))\fP"
- .dX >>>MULTIKBD<<<
- where \fIname\fP is a normal string. This command has two effects:
- .nI
- Keybind initializes a key table for each \fIname\fP.
- .In
- and
- .nI
- The macros \fIname\fP are defined and can be used within other macro
- definitions to switch to a certain keytab. Like macros, defined with
- \fB>>>DEFOP<<<\fP, they are not stored in fixed macro buffers, but you can
- use them for your one function/macro definitions.
- .In
- .nB
- the definition of keyboard translation tables can be spread over
- multiple \fB( >>>MULTIKBD<<<\fP ... \fB)\fP statements. So the following
- OCL sources have the same meaning:
- .\"{{{ single statement
- .DS
- \fB( >>>MULTIKBD<<<\fP \fB( \fP \fIkbd_1 kbd_2\fP \fB) )\fP
- .DE
- .\"}}}
- and
- .\"{{{ sequence of statements
- .DS
- \fB( >>>MULTIKBD<<<\fP \fIkbd_1\fP \fB)\fP
- \fB( >>>MULTIKBD<<<\fP \fIkbd_2\fP \fB)\fP
- .DE
- .\"}}}
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ bindings
- .LP
- The first defined mode is active when starting Origami. The definition
- of a declared keyboard can be done with:
- .\"{{{ >>>KBD<<<
- .bI "\fB(>>>KBD<<<\fP \fIname\fP \fB(>>>KEYDEF<<<\fP ... \fB)\fP ... \fB)\fP"
- .dX >>>KBD<<<
- All given bindings are put into the keytable for <name>. \fB(>>>KEYDEF<<<
- >>>O_BREAK<<< ... )\fP must be declared outside any \fB(>>>KBD<<<\fP ... \fB)\fP
- statement, which means you can only have one abort key for all modes.
- If using multiple keyboard modes, no other \fB(>>>KEYDEF<<<\fP ... \fB)\fP
- statement is allowed outside \fB(>>>KBD<<<\fP ... \fB)\fP statements.
- .LP
- Using this statement more than once for a specific keytable adds all
- given bindings to the given mode.
- .Ib
- .\"}}}
- .\"}}}
- .\"}}}
- .\"{{{ terminals
- .nH 3 "Terminals"
- .LP
- .iX >>>TERMINAL<<<
- You can configure Origami for different terminals in one >>>RC_ENDING<<< file by using
- \fB>>>TERMINAL<<<\fP. Terminal dependent aliases can be declared on toplevel
- via:
- .\"{{{ terminal alias
- .bI "\fB(>>>TERMINAL<<<\fP [ \fB(\fP ] \fIname\fP [ ... \fB)\fP ] \fB(>>>KEYALIAS<<<\fP ... \fB)\fP ... \fB)\fP"
- .dX >>>TERMINAL<<<
- .iX >>>KEYALIAS<<<
- The corresponding alias definitions will be used for the different
- terminals. Terminal dependent aliases inside the \fB(>>>KEYALIAS<<<\fP ...
- \fB)\fP statements are handled for each terminal. The given aliases are
- internally stored as \fItermname\fP\fB@\fP\fIaliasname\fP. Use \fBautoalias\fP
- to generate your alias declarations.
- .Ib
- .\"}}}
- .LP
- Terminal dependent bindings can be used inside and outside of
- \fB(>>>KBD<<<\fP \&.\&.\&. \fB)\fP statements. The declaration has to be
- made like:
- .\"{{{ terminal >>>KEYDEF<<<
- .bI "\fB(>>>TERMINAL<<<\fP [ \fB(\fP ] \fIname\fP [ ... \fB)\fP ] \fB(>>>KEYDEF<<<\fP ... \fB)\fP ... \fB)\fP"
- .dX >>>TERMINAL<<<
- .iX >>>KEYDEF<<<
- The \fB(>>>KEYDEF<<<\fP \&..\&.\&\fB )\fP commands inside this statement
- are only active if Origami is used on a terminal named \fIname\fP (value
- of environment variable >>>ORITERM<<< or >>>TERM<<<). Used aliases have
- to be declared globally or must be declared as terminal dependent for
- all named terminals. If a alias is not declared for one of the given
- terminals, the bindings will not be done for this terminal and a
- errormessage will be printed.
- .Ib
- .\"}}}
- .LP
- .iX >>>DEFAULT<<<
- Using \fB>>>DEFAULT<<<\fP as terminalname in \fB(>>>TERMINAL<<<\fP ..\&. \fB)\fP
- statements is allowed. The corresponding binding will only be done for
- the default-table.
- .wA
- Binding sequences to an as yet not used terminal copies the currently
- known part of the default terminal.
- .nB
- This is not the whole story! we are still trying to work out how to express
- this accurately!
- .LP
- Some different terminals use the same character sequences for their
- different keys. To prevent multiple keytables for these terminals, you
- can use:
- .\"{{{ >>>TERMALIAS<<<
- .bI "\fB(>>>TERMALIAS<<<\fP \fItermname\fP \fB(\fP \fIaliastermname\fP ... \fB))\fP"
- .dX >>>TERMALIAS<<<
- If \fB$>>>TERM<<<\fP/\fB$>>>ORITERM<<<\fP is set to one of the
- \fIaliastermname\fPs, the keytable for \fItermname\fP is used. If
- \fIaliastermname\fP ends with \fB*\fP, \fB*\fP matches any text.
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ conditional compilation
- .nH 3 "Conditional compilation"
- .LP
- .iX "Conditional compilation"
- OCL offers the possibility to use the same OCL source for different
- keybindings by using the commands \fB@>>>if_u_name<<<\fP and \fB@>>>COMPUSE<<<\fP to
- control the compilation of the OCL source. Some parts of the source
- will be handled like comments (like #if .. #endif in C).
- .\"{{{ >>>COMPUSE<<< (..)
- .bI "\fB@>>>COMPUSE<<< (\fP \fIname\fP ... \fB)\fP"
- .dX @>>>COMPUSE<<<
- From now on the identifiers \fIname\fP ... are known as set tags.
- .Ib
- .\"}}}
- .\"{{{ >>>COMPUSE<<< >>>NOT<<<(..)
- .bI "\fB@>>>COMPUSE<<< >>>NOT<<<(\fP \fIname\fP ... \fB)\fP"
- .dX @>>>COMPUSE<<<
- .dX >>>NOT<<<
- From now on the identifiers \fIname\fP ... are not known as set tags.
- .Ib
- .\"}}}
- .\"{{{ >>>if_u_name<<< (..)
- .bI "\fB@>>>if_u_name<<< (\fP \fItag\fP ... \fB)\fP \fIstatement\fP ... \fB@fi\fP"
- .dX @>>>if_u_name<<<
- .dX @fi
- The list of statements will only be compiled if one of the tags is set.
- .Ib
- .\"}}}
- .\"{{{ >>>if_u_name<<< >>>NOT<<<(..)
- .bI "\fB@>>>if_u_name<<< >>>NOT<<<(\fP \fItag\fP ... \fB)\fP \fIstatement\fP ... \fB@fi\fP"
- .dX @>>>if_u_name<<<
- .dX >>>NOT<<<
- .dX @fi
- The list of statements will only be compiled if none of the tags is set.
- .Ib
- .\"}}}
- .wA
- .iX "filed fold"
- if a filed fold appears inside
- \fB@>>>if_u_name<<<\fP \fB(\fP \fInot-defined-tag\fP \fB)\fP, the fold
- will not be read to speed up compilation. In this way it is impossible
- to start a \fB@>>>if_u_name<<<\fP-block in one file and end it in
- another !
- .\"}}}
- .\"{{{ specials
- .nH 3 "Special commands"
- .LP
- .\"{{{ limiters
- .\"{{{ mode limiter
- .bI "\fB(>>>MODE_COMMA<<< \fP\fIchar\fP\fB)\fP"
- .dX >>>MODE_COMMA<<<
- .iX ".origami>>>MSG_ENDING<<<"
- The character, which is used to limit the modes is replaced by
- \fIchar\fP. This overwrites changes made in the \fB.origami>>>MSG_ENDING<<<\fP
- file.
- .Ib
- .\"}}}
- .\"{{{ line limiter
- .bI "\fB(>>>LINEEND<<< \fP\fIchar\fP\fB)\fP"
- .dX >>>LINEEND<<<
- .iX ".origami>>>MSG_ENDING<<<"
- .iX User
- .iX "long statusline"
- The character, which is used to mark long lines is replaced by
- \fIchar\fP. This overwrites changes made in the \fB.origami>>>MSG_ENDING<<<\fP
- file. This character is also used, to mark cut strings in language
- \fBUser\fP.
- .Ib
- .\"}}}
- .\"{{{ shift mark
- .bI "\fB(>>>LINESTART<<< \fP\fIchar\fP\fB)\fP"
- .dX >>>LINESTART<<<
- .iX ".origami>>>MSG_ENDING<<<"
- The character, which is used to mark lines, shifted to the left. This
- overwrites changes made in the \fB.origami>>>MSG_ENDING<<<\fP file. If
- \fB>>>LINESTART<<<\fP is set to space, no marks are printed!
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ >>>OS_EXT<<<
- .bI "\fB(>>>OS_EXT<<< (\fP \fIelement\fP ... \fB))\fP"
- .dX >>>OS_EXT<<<
- Keybind generates a >>>RC_ENDING<<<-file entry, containing the given text. The
- standard UN*X Origami will ignore these entries, but special ports to
- non-UN*X operating-systems may use these entries for their own purposes.
- \fIelement\fP can be:
- .\"{{{ string
- .sI \fIstring\fP
- .Is
- .\"}}}
- .\"{{{ function
- .bI \fIfunction-name\fP
- will be replaced by the used macro place!
- .Ib
- .\"}}}
- .\"{{{ history
- .bI "\fB>>>HISTORY<<<\fP \fIhistory-name\fP"
- will be replaced by the internal history id!
- .Ib
- .\"}}}
- .\"{{{ mode
- .bI "\fB>>>KBD<<<\fP \fIname\fP"
- will be replaced by the internal keyboard number (0,1,..)!
- .Ib
- .\"}}}
- .Ib
- .\"}}}
- .\"{{{ >>>COMMENT<<<
- .bI "\fB@>>>COMMENT<<<\fP \fItext\fP"
- .dX @>>>COMMENT<<<
- All text following \fB@>>>COMMENT<<<\fP up to the end of line will be put
- unchanged into the >>>RC_ENDING<<<-file. Origami always ignores this >>>RC_ENDING<<<-file entry.
- .Ib
- .\"}}}
- .\"{{{ >>>OPP_ERROR<<<
- .bI "\fB@>>>OPP_ERROR<<<\fP \fItext\fP"
- .dX @>>>OPP_ERROR<<<
- Generate a compilation error. Report all \fItext\fP following
- \fB@>>>OPP_ERROR<<<\fP up to the end of the line as error-message.
- .Ib
- .\"}}}
- .\"{{{ >>>LINENO<<<
- .bI "\fB@>>>LINENO<<<\fP \fIline number\fP"
- .dX @>>>LINENO<<<
- Sets the line position in the current file to \fIline number\fP.
- Useful for OCL-filters, which add/delete lines in the OCL source.
- .Ib
- .\"}}}
- .LP
- The following functions are special commands, for internal use. Only
- experienced OCL programmers should use these functions. They can be
- bound to keysequences (except \fB>>>ECHO_B<<<\fP, \fB>>>ECHO_P<<<\fP,
- \fB>>>SAVE_LAYOUT<<<\fP, \fB>>>RESTORE_LAYOUT<<<\fP,
- \fB>>>POP_DELBUFF<<<\fP,\fB>>>HISTORY<<<\fP, \fB>>>HISTORY_GET<<<\fP and
- \fB>>>HISTORY_EDIT<<<\fP) or used in functions/macros.
- .\"{{{ >>>ECHO_B<<<
- .bI "\fB>>>ECHO_B<<<\fP \fIterm\fP"
- .iX terminal
- .dX >>>ECHO_B<<<
- \fB>>>ECHO_B<<<\fP ignores \fB>>>SCROFF<<<\fP,\fB>>>SCRON<<<\fP and send byte
- \fIterm\fP to stdout (terminal).
- .Ib
- .\"}}}
- .\"{{{ >>>ECHO_P<<<
- .bI "\fB>>>ECHO_P<<<\fP \fImessage-string\fP"
- .iX terminal
- .iX message-string
- .dX >>>ECHO_P<<<
- Like \fB>>>ECHO_B<<<\fP, but send the string \fImessage-string\fP.
- .Ib
- .\"}}}
- .\"{{{ >>>HISTORY<<<
- .bI "\fB>>>HISTORY<<<\fP \fIhistory-name\fP"
- .dX >>>HISTORY<<<
- .iX history
- Do not use the default histories for prompting commands. The default
- history is replaced by the history \fIhistory-name\fP. Predefined are:
- .\"{{{ table of of predefined histories
- .dX >>>SEARCH_HIST<<<
- .dX >>>REPL_HIST<<<
- .dX >>>MISC_HIST<<<
- .dX >>>FILE_HIST<<<
- .dX >>>SHELL_HIST<<<
- .dX >>>ERR_HIST<<<
- .dX >>>ARG_HIST<<<
- .dX >>>MATCH_HIST<<<
- .dX >>>NO_MATCH_HIST<<<
- .dX >>>NO_HIST<<<
- .dX >>>DEFAULT<<<
- .TS
- tab(|);
- l l.
- name:|history, used in:
- \fB>>>SEARCH_HIST<<<\fP|\fB>>>O_FIND<<<\fP, ..
- \fB>>>REPL_HIST<<<\fP|\fB>>>O_REPLACE<<<\fP, ..
- \fB>>>MISC_HIST<<<\fP|\fB>>>O_GOTO_LINE<<<\fP, ..
- \fB>>>FILE_HIST<<<\fP|\fB>>>O_OPEN_NEW_FILE<<<\fP, ..
- \fB>>>SHELL_HIST<<<\fP|\fB>>>O_SHELL<<<\fP, ..
- \fB>>>ERR_HIST<<<\fP|error messages are stored here
- \fB>>>ARG_HIST<<<\fP|list of aliased command line arguments
- \fB>>>MATCH_HIST<<<\fP|used for \fB\-f\fP in directory edit mode.
- \fB>>>NO_MATCH_HIST<<<\fP|used for \fB\-F\fP in directory edit mode.
- \fB>>>NO_HIST<<<\fP|no history
- \fB>>>DEFAULT<<<\fP|use standard histories
- .TE
- .\"}}}
- Other histories are declared outside of functions/macros with:
- .\"{{{ >>>HISTORY<<<
- .bI "\fB( >>>HISTORY<<<\fP \fIhistory-name\fP \fB)\fP"
- .dX >>>HISTORY<<<
- .iX history
- .iX >>>HISTORY_EDIT<<<
- .Ib
- .\"}}}
- .Ib
- .\"}}}
- .\"{{{ >>>HISTORY_EDIT<<<
- .bI "\fB>>>HISTORY_EDIT<<<\fP \fIhistory-name message-string\fP"
- .iX message-string
- .dX >>>HISTORY_EDIT<<<
- .iX history
- Prompt for a string and use history \fIhistory-name\fP.
- .Ib
- .\"}}}
- .\"{{{ >>>HISTORY_EDIT_L<<<
- .bI "\fB>>>HISTORY_EDIT_L<<<\fP \fIhistory-name message-string\fP"
- .iX message-string
- .dX >>>HISTORY_EDIT_L<<<
- .iX >>>HISTORY_EDIT<<<
- .iX history
- Like \fB>>>HISTORY_EDIT<<<\fP, but the prompt is initialized with the
- current line and cursor position. Spaces from entered folds are
- skipped.
- .Ib
- .\"}}}
- .\"{{{ >>>HISTORY_EDIT_F<<<
- .bI "\fB>>>HISTORY_EDIT_F<<<\fP \fIhistory-name message-string\fP"
- .iX message-string
- .dX >>>HISTORY_EDIT_F<<<
- .iX >>>HISTORY_EDIT<<<
- .iX history
- Like \fB>>>HISTORY_EDIT<<<\fP, but the prompt is initialized with the
- current filename.
- .Ib
- .\"}}}
- .\"{{{ >>>HISTORY_GET<<<
- .bI "\fB>>>HISTORY_GET<<<\fP \fIhistory-name term\fP"
- .dX >>>HISTORY_GET<<<
- .iX history
- Insert a string from history list \fIhistory-name\fP into the input
- stream. \fIterm\fP gives the number of the chosen item (0 is newest, 1
- is one before, ...).
- .Ib
- .\"}}}
- .\"{{{ note beside: histories=string-vars
- .nB
- histories can be used as string variables.
- .\"}}}
- .\"{{{ >>>POP_DELBUFF<<<
- .bI "\fB>>>POP_DELBUFF<<<\fP"
- .dX >>>POP_DELBUFF<<<
- .iX delete buffer
- Remove the last deleted line from the delete buffer. There is \fBno\fP
- undo for this action.
- .eI
- .\"}}}
- .\"{{{ >>>SCROFF<<<
- .bI "\fB>>>SCROFF<<<\fP"
- .dX >>>SCROFF<<<
- Turn off the screen display. If keyboard input is expected and the screen is
- switched off, the abort key is automatically invoked and the display turned
- on again.
- .Ib
- .\"}}}
- .\"{{{ >>>SCRON<<<
- .bI "\fB>>>SCRON<<<\fP"
- .dX >>>SCRON<<<
- Turn on the screen display. You have to call \fB>>>O_FLUSH<<<\fP yourself.
- .Ib
- .\"}}}
- .\"{{{ >>>SAVE_LAYOUT<<<
- .bI \fB>>>SAVE_LAYOUT<<<\fP
- .dX >>>SAVE_LAYOUT<<<
- Saves the current window positions. There is no stack, so using this
- command more than once will overwrite the data.
- .Ib
- .\"}}}
- .\"{{{ restore-layout
- .bI \fB>>>RESTORE_LAYOUT<<<\fP
- .dX >>>RESTORE_LAYOUT<<<
- .iX >>>SAVE_LAYOUT<<<
- Try to restore the buffer sizes and positions to the ones, saved by the
- last \fB>>>SAVE_LAYOUT<<<\fP command. The screen will be refreshed. New
- buffers always set their saved size to 0 lines and 0 columns. However,
- the minimum size for the current buffer is >>>TXT_MIN_H<<< lines and >>>TXT_MIN_W<<<
- columns.
- .Ib
- .\"}}}
- .\"{{{ >>>O_PROMPT<<<
- .bI "\fB>>>O_PROMPT<<<\fP"
- .dX >>>O_PROMPT<<<
- .iX >>>SCROFF<<<
- .iX >>>SCRON<<<
- .iX >>>O_FLUSH<<<
- Refresh the current line. \fB>>>SCROFF<<<\fP/\fB>>>SCRON<<<\fP can be used for
- single line operations, without redrawing the complete screen.
- .Ib
- .\"}}}
- .LP
- There are a special OCL commands, which can be used to load/remove
- demand loaded macros:
- .\"{{{ >>>LOAD<<<
- .bI "\fB>>>LOAD<<< (\fP \fIname\fP \&.\&. \fB)\fP"
- .dX >>>LOAD<<<
- .iX >>>DEMAND<<<
- Tries to load all named functions. May be used to speed up libraries,
- using many demand loaded functions.
- .Ib
- .\"}}}
- .\"{{{ >>>LOAD<<< >>>NOT<<<
- .bI "\fB>>>LOAD<<< >>>NOT<<<(\fP \fIname\fP .. \fB)\fP"
- .dX ">>>LOAD<<< >>>NOT<<<"
- .iX >>>NOT<<<
- .iX >>>LOAD<<<
- .iX >>>DEMAND<<<
- Remove the functions \fIname\fP .., if they are a demand loaded. If one
- of the functions is needed again, it will be loaded automatically.
- .wA
- there are no test, if the macro is currently in use. Origami may die, if
- you remove a used macro!
- .Ib
- .\"}}}
- .\"}}}
- .\"{{{ references
- .nH 3 "References"
- .LP
- .iX references
- The following command can be used to generate additional text files
- while compiling new binding:
- .\"{{{ reference-begin/end
- .hI
- \fB@>>>STARTREF<<<\fP
- .br
- <comments>
- .br
- :
- .br
- \fB@>>>end_ref<<<\fP
- .tI
- .dX @>>>STARTREF<<<
- .dX @>>>end_ref<<<
- If the command line option \fB\-r\fP\fIreferencefile\fP is active, all
- comments will be put into \fIreferencefile\fP. The text between the
- \fB@>>>STARTREF<<<\fP / \fB>>>end_ref<<<\fP marks will not be parsed as OCL
- code, so that the commands must appear at the beginning of a line and
- must be followed by a newline. If the command line option \fB\-R\fP is
- active, the data will copied to the >>>RC_ENDING<<< file. Origami can display it
- with \fB>>>O_HELP<<<\fP, if no other helpfile is given. The lines are cut, if
- they have more than >>>RC_HELP_LEN<<< characters.
- .eI
- .\"}}}
- .LP
- The next command can be used, to store different help pages in the rc
- file:
- .\"{{{ reference-begin-class/end
- .hI
- \fB@>>>STARTREF_NO<<<\fP \fBname\fP
- .br
- <comments>
- .br
- :
- .br
- \fB@>>>end_ref<<<\fP
- .br
- .tI
- .dX @>>>STARTREF_NO<<<
- .dX @>>>end_ref<<<
- .iX >>>O_HELP<<<
- .iX >>>M_O_VAR<<<
- All comments will be put into the >>>RC_ENDING<<< file. The text can be read by
- using \fB>>>O_HELP<<<\fP, if OCL variable \fB>>>M_O_VAR<<<\fP is set to
- \fIname\fP (keybind creates a constant integer value for \fIname\fP).
- Instead of symbolic names, you can also use integer constants
- \fInumber\fP (\fB1\fP<=\fInumber\fP<=\fB>>>RC_CLASS_MAX<<<\fP). The
- lines are cut, if they have more than >>>RC_HELP_LEN<<< characters.
- .eI
- .\"}}}
- .LP
- Origami compresses the references or
- \fB>>>O_DESCRIBE_BINDINGS<<<\fP-data, before adding them to the
- >>>RC_ENDING<<<-file. There is a default list of words, which will be
- stored with a 2 byte coding. The following command can be used, to
- modify this list.
- .\"{{{ >>>REF_COMP<<<
- .bI "\fB( >>>REF_COMP<<<\fP [\fB>>>SET_COUNTER<<<\fP] \fB(\fP \fIstring\fP .. \fB) )\fP"
- All strings \fIstring\fP will be added to the list of compression words.
- If \fB>>>SET_COUNTER<<<\fP is used, the list will be set to the empty
- list, before adding the strings.
- .nB
- there can be more than one \fB>>>REF_COMP<<<\fP commands in a OCL source.
- .nB
- the words are tested in the order of their appearance, so prefixes of
- longer words should be defined after the definition of their extensions.
- .Ib
- .\"}}}
- .\"}}}
- .\"}}}
- .\"{{{ OCL examples
- .nH 2 "OCL examples"
- .LP
- This section includes some commented OCL examples for you to browse
- through before starting your own applications. It is assumed that you
- are familiar with Origami before you start programming in OCL.
- .\"{{{ simple keybindings
- .nH 3 "Bindings keys"
- .LP
- The following examples show how you can bind commands to (sequences of)
- keys and how aliases work.
- .\"{{{ first example with return
- .eX >>>KEYDEF<<<
- .eX C-
- .DS
- ; This is a simple keybind file
- (>>>KEYDEF<<< >>>O_RETURN<<< C-M)
- .DE
- The operation `>>>O_RETURN<<<' is activated by pressing the key C-M. The
- line `>>>O_RETURN<<< C-M' will be included in the keybinding help screens
- available to the user.
- .\"}}}
- .\"{{{ same example with alias
- You can achieve the same keybinding by using an alias:
- .eX >>>KEYDEF<<<
- .eX >>>KEYALIAS<<<
- .eX C-
- .eX $
- .DS
- ; This keybinding uses >>>KEYALIAS<<<
- (>>>KEYALIAS<<< enter C-M)
- (>>>KEYDEF<<< >>>O_RETURN<<< $enter)
- .DE
- The operation `>>>O_RETURN<<<' is activated by C-M as before;
- the keybinding help will show `>>>O_RETURN<<< enter'. If your
- terminal sends an unusual sequence of characters for the enter key instead
- of the C-M character (very rare), you would just define your own alias for $enter
- and leave the comprehensive >>>KEYDEF<<< command unchanged.
- .\"}}}
- .\"}}}
- .\"{{{ byebye
- .nH 3 "A small function"
- .LP
- The first OCL example does not use any control structures. It defines a
- macro named byebye. You should play a little with such functions/macros
- to get used to the compilation process and its (error) messages.
- .eX >>>DEFOP<<<
- .eX macro
- .eX >>>KEYDEF<<<
- .eX M-
- .DS
- ; this is an example for a function definition:
- ( >>>DEFOP<<< byebye
- ( >>>O_BOT_OF_FOLD<<<
- >>>O_START_OF_LINE<<<
- >>>O_RETURN<<<
- >>>O_UP<<<
- "end " "of " "text
- )
- )
- .sp
- (>>>KEYDEF<<< byebye (M-"x "b "y "e))
- .DE
- byebye creates a new line containing \fBend of text\fP at the end of the
- entered fold.
- .\"}}}
- .\"{{{ shell version control
- .nH 3 "Revision control system"
- .LP
- Two more little functions deal with RCS. Note that the check out function
- is only for personal use of RCS. If you are working in a group, someone
- else may have edited the file, which will not change your own read only
- copy. The advantage is that you can visit a file and decide if you want
- to change it.
- .eX >>>DEFMACRO<<<
- .eX function
- .eX RCS
- .eX >>>O_SHELL_COMMAND<<<
- .eX view-mode
- .DS
- (>>>DEFMACRO<<< check-out (
- >>>IF<<< >>>NOT<<<(>>>EDITING<<<)
- (
- >>>O_D_VIEW<<<
- >>>O_SHELL_COMMAND<<< "co " "-l " "$>>>ORIFILE<<<
- )
- >>>fi_name<<<
- ))
-
- (>>>DEFMACRO<<< check-in (
- >>>IF<<< >>>NOT<<<(>>>EDITING<<<)
- (
- >>>O_SAVE_FILE<<<
- >>>O_A_VIEW<<<
- >>>O_SHELL_COMMAND<<< "ci " "-u " "$>>>ORIFILE<<<
- )
- >>>fi_name<<<
- ))
- .DE
- .\"}}}
- .\"{{{ mtool-top
- .nH 3 "MTool-version of top-of-fold"
- .LP
- This a user defined function, simulating the command top-of-fold as it
- is used in the mtool system. The cursor moves to the begin of the
- currently opened fold.
- .eX TDS
- .eX >>>LANG_Inmos<<<
- .eX >>>DEFMACRO<<<
- .eX function
- .DS
- ; example for a more complex function
- (>>>DEFMACRO<<< mtool-top
- (
- >>>IF<<< >>>TEST_END_FOLD<<< (>>>O_UP<<<) >>>fi_name<<<
- >>>WHILE<<< >>>AND<<<(>>>NOT<<<(>>>TEST_BEGIN_FOLD<<<),>>>NOT<<<(>>>TEST_TOP<<<))
- (
- >>>IF<<< >>>TEST_END_FOLD<<< (mtool-top) >>>fi_name<<<
- >>>O_UP<<<
- )
- ))
- .DE
- While the cursor is not being located on top of a fold (entered or
- opened) the cursor is moved up. If the function finds the end of fold line
- from another opened fold, this fold is skipped by a recursive call of
- mtool-top.
- .\"}}}
- .\"{{{ fill-paragraph
- .nH 3 "Fill paragraph"
- .LP
- The next example function is a bit more advanced. It is too lengthy to
- include it here, but it can be found in the file fill-paragraph.
- .LP
- fill-paragraph fills all lines from cursor position to the next line
- with a blank (or a dot in ``roff-mode'') in the first column. Not text
- lines and line, starting wtih fold-comment-start string stop r filling
- too. The first column of a line is here the first character in
- currently entered fold, not opened fold! Filling a line means to add
- words from the next line if it is too short or to put words to the next
- line if it is to long. The default right margin is set to column 72.
- If there are unfillable lines, fill-paragraph stops filling and
- complains. Fill-column counts from beginning of entered fold
- indentation.
- .LP
- The filling can be done in the following 2 ways:
- .Ib
- .bI "block-mode"
- All `` '' are expanded to `` '', till the line reaches the fill margin.
- .Ib
- .bI "shrink-mode"
- All `` '' are replaced by `` '' and the right margin remains unaligned
- or ragged.
- If language \fBRoff\fP is active, ``. '' is replaced by ``. ''.
- .Ib
- .LP
- The function set-fill-mode switches between these modes.
- .LP
- The function auto-wrap can be used instead of `` ''. If the cursor is
- at end of line, the currently typed word is automatically wrapped into a
- new line.
- .LP
- The function set-fill-column allows to change the right margin. To do
- so, you can either use a numeric argument, point to the position of the
- new right margin with the cursor or make Origami prompt for the new
- column width by moving the cursor to the left margin.
- .\"}}}
- .\"{{{ goto-matching-fence
- .nH 3 "Goto matching fence"
- .LP
- If you are writing programs, you often want to know which parentheses
- match in a complicated expression. \fBgoto-matching-fence\fP performs
- this function. It uses the character under the cursor to determine if
- you are looking for a round, square or curly bracket and if you want to
- jump to the opening or the closing one. If the cursor is not located on
- a bracket, nothing will happen. Otherwise the function searches the
- matching fence. If it cannot find it, it will move back to your old
- position. If necessary, this function opens and closes folds. Do not
- worry if it does not seem to stop searching. If your text is very long
- and there is no fitting fence, you will be amazed how many folds you are
- using and how fast they can be opened and closed, but usually
- goto-matching-fence will exit gracefully at last. Remember the
- operation can also be interrupted by the abort character (often bound to
- C-G).
- .\"}}}
- .\"{{{ towers-of-hanoi
- .nH 3 "The towers of hanoi"
- .LP
- This is a funny function to demonstrate the power of OCL. You should
- type a string of a few characters without blanks, then start this function
- and have fun.
- .wA
- If you type more than about eight to ten characters, the game will
- require a long time.
- .\"}}}
- .\"{{{ conditional compilation
- .nH 3 "Conditional compilation"
- .\"{{{ simple example
- .LP
- A simple example for the usage of conditional compilation:
- .eX "Conditional compilation"
- .eX @>>>if_u_name<<<
- .eX @>>>fi_name<<<
- .eX >>>NOT<<<
- .DS
- @>>>if_u_name<<< (foo)
- \&.\&.\&. block
- @>>>fi_name<<<
- .DE
- `\&.\&.\&. block' will only be compiled if the tag \fIfoo\fP is known
- as used. This can be done by an earlier \fB@>>>COMPUSE<<< (\fP\fIfoo\fP\fB)\fP or
- by the commandline option \fB-U\fP\fIfoo\fP.
- .\"}}}
- .\"{{{ file-fold example
- .LP
- Another example shows the usage of conditional compilation to prevent
- multiple compilation of a file:
- .eX @>>>if_u_name<<<
- .eX @>>>fi_name<<<
- .eX >>>COMPUSE<<<
- .eX libraries
- .DS
- @>>>if_u_name<<< >>>NOT<<<(FILENAME)
- @>>>COMPUSE<<< (FILENAME)
- \&.\&.\&. block
- @>>>fi_name<<<
- .DE
- .LP
- This technique is used in the library files in the bindings directory.
- .\"}}}
- .\"{{{ multiple configurations
- .LP
- The following example shows, how different keyboards, function and macro
- sets etc.\& can be handled properly with one OCL source. You need only
- one tag to choose the correct environment. This can be done either by
- an earlier \fB@>>>COMPUSE<<< (\fP\fI??\fP\fB)\fP or by the command switch
- \fB\-U\fP\fI??\fP.
- .eX @>>>if_u_name<<<
- .eX @>>>fi_name<<<
- .eX @>>>COMPUSE<<<
- .DS
- .\"{{{ set tags
- {\&{\&{ choose correct compilation tags
- @>>>if_u_name<<< (kbd_1_macros_1)
- @>>>COMPUSE<<< ( kbd_1 mac_1 )
- @>>>fi_name<<<
- @>>>if_u_name<<< (kbd_2_macros_1)
- @>>>COMPUSE<<< ( kbd_2 mac_1 )
- @>>>fi_name<<<
- ; you can write such statements as well:
- @>>>if_u_name<<< (kbd_1_macros_2) @>>>COMPUSE<<< ( kbd_1 mac_2 ) @>>>fi_name<<<
- @>>>if_u_name<<< (kbd_2_macros_2) @>>>COMPUSE<<< ( kbd_2 mac_2 ) @>>>fi_name<<<
- @>>>if_u_name<<< ( kbd_2_c ) @>>>COMPUSE<<< (kbd_2 c_macs mac_1) @>>>fi_name<<<
- }\&}\&}
- .\"}}}
- .DE
- .eX @>>>if_u_name<<<
- .eX @>>>fi_name<<<
- .DS
- .\"{{{ macros
- {\&{\&{ macros
- \&.\&.\&. simple macros
- @>>>if_u_name<<< (mac_2)
- .\&.\&.F special tex macros
- @>>>fi_name<<<
- @>>>if_u_name<<< (mac_1)
- .\&.\&.F text edit helps
- @>>>fi_name<<<
- @>>>if_u_name<<< (c_macs)
- .\&.\&.F c_macros
- @>>>fi_name<<<
- }\&}\&}
- .\"}}}
- .DE
- .eX @>>>if_u_name<<<
- .eX @>>>fi_name<<<
- .DS
- .\"{{{ kbd
- \&{\&{\&{ keyboard mapping
- \&.\&.\&. terminal_keymap (esc,shift,ctrl ... )
- @>>>if_u_name<<< (kbd_1)
- .\&.\&.F simple_keys (cursor- and functionkeys)
- @>>>fi_name<<<
- @>>>if_u_name<<< (kbd_2)
- .\&.\&.F more_complex_keys (cursor- and functionkeys)
- @>>>fi_name<<<
- }\&}\&}
- .\"}}}
- .DE
- The usage of more descriptive identifiers is left as an exercise for
- the reader.
- .\"}}}
- .\"}}}
- .\"{{{ including files
- .nH 3 Libraries
- .LP
- To use a library file, you can use the following 3 techniques:
- .\"{{{ filed fold
- .eX "filed fold"
- .eX >>>include_name<<<
- .DS
- ; to include the file filename
- ; in the current directory:
- \&...F filename
- .DE
- .\"}}}
- or
- .\"{{{ >>>include_name<<<
- .eX >>>include_name<<<
- .eX @>>>include_name<<<
- .DS
- ; to include the file filename
- ; in the current directory:
- @>>>include_name<<< filename
- .DE
- .\"}}}
- or
- .\"{{{ >>>LIB<<<
- .eX >>>include_name<<<
- .eX libraries
- .eX @>>>LIB<<<
- .DS
- ; to include a file filename
- ; in directory dir (dir is part of
- ; the keybind library path):
- @>>>LIB<<< filename
- .DE
- .\"}}}
- .\"}}}
- .\"{{{ terminals und modes
- .nH 3 "Modes and terminals"
- .\"{{{ simple example
- .LP
- A simple example for the usage of multiple keyboards is the following:
- .\"{{{ example
- .eX >>>MULTIKBD<<<
- .eX >>>KBD<<<
- .eX >>>DEFAB<<<
- .eX >>>KEYDEF<<<
-
- .DS
- (>>>MULTIKBD<<< edit shell)
- .DE
- .DS
- ( >>>DEFMACRO<<< shell-commands ( >>>O_A_VIEW<<< shell ) )
- ( >>>DEFMACRO<<< editing ( >>>O_D_VIEW<<< edit ) )
- ( >>>DEFAB<<< editing )
- .DE
- .DS
- (>>>KBD<<< edit
- .\&.\&. bind all normal edit commands
- ( >>>KEYDEF<<< shell-commands ( .. ) )
- )
- .DE
- .DS
- (>>>KBD<<< shell
- .\&.\&. bind commands calling special shell scripts
- ( >>>KEYDEF<<< editing ( .. ) )
- )
- .DE
- .DS
- \&.\&.\&. some other macros
- (>>>KBD<<< shell ; mode is splitted in 2 definitions
- .\&.\&. bind commands calling special shell-scripts,part 2
- )
- .DE
- .\"}}}
- This enables you to use all normal characters for your
- shell commands or predefined system calls.
- .\"}}}
- .\"{{{ terminals
- .LP
- Another example shows the usage of terminal dependent bindings.
- .\"{{{ example
- .eX >>>MULTIKBD<<<
- .eX >>>KEYALIAS<<<
- .eX >>>TERMINAL<<<
- .eX >>>KEYDEF<<<
- .DS
- (>>>MULTIKBD<<< keyboard)
- \&.\&.\&. aliases for SUN-keyboard
- \&.\&.\&. aliases for PC-keyboard
- (>>>KBD<<< keyboard
- .\&.\&. all normal edit commands
- ( >>>TERMINAL<<< SUN
- .\&.\&. all SUN keyboard function keys
- )
- ( >>>TERMINAL<<< PC
- .\&.\&. all PC keyboard function keys
- )
- )
- .DE
- .\"}}}
- .LP
- Origami loads only one of the given tables, depending on the value of
- \fB$>>>ORITERM<<<\fP or \fB$>>>TERM<<<\fP. The default keyboard uses
- none of the additional bindings.
- .LP
- The following is an example for using terminal dependencies for aliases
- too:
- .\"{{{ example
- .eX >>>MULTIKBD<<<
- .eX >>>TERMINAL<<<
- .eX autoalias
- .eX >>>KBD<<<
- .eX >>>KEYDEF<<<
- .DS
- (>>>MULTIKBD<<< keyboard)
- .DE
- .DS
- \&{\&{\&{ aliases for SUN keyboard - autoalias
- ; created with 'autoalias -tsun'
- ( >>>TERMINAL<<< sun
- ( >>>KEYALIAS<<< up ( ... ) )
- \&.\&..
- )
- \&}\&}\&}
- \&.\&.\&. aliases for PC keyboard - hand coded
- .DE
- .DS
- (>>>KBD<<< keyboard
- .\&.\&. all normal edit commands
- ( >>>TERMINAL<<< ( sun PC )
- ( >>>KEYDEF<<< >>>O_UP<<< ( $up ) )
- ; instead of $up, $sun@up and $PC@up
- ; will be used in the two tables
- \&.\&..
- )
- )
- .DE
- .\"}}}
- .\"}}}
- .\"}}}
- .\"{{{ options,startup,hooks
- .nH 3 "Command line options, hooks"
- .LP
- .eX "Command line options"
- This example shows, how complex bindings can use their own command line
- options. It also shows, how the semantics of a predefined command can
- be changed. The new command line options \fBnohigh\fP, \fBhigh\fP,
- \fBstat\fP and \fBnostat\fP are defined to be used with \fB\-O\fP to
- enable, disable the highlighting while creating a fold and the display
- of the statusline.
- .\"{{{ example
- .DS
- .eX "Command line options"
- .\"{{{ names and modes
- \&{{{ names and modes
- .eX >>>OCL_ARG_V<<<
- .eX >>>BINDNAME<<<
- ( >>>BINDNAME<<<
- Example
- ( "high "|1^1 ) ( "nohigh "|1 )
- ( "stat "|2^2 ) ( "nostat "|2 )
- ; use bits 0,1 for the two modes
- ; FALSE=default=display on
- )
- \&}}}
- .\"}}}
- .\"{{{ variables
- \&{{{ variables
- ( >>>DEFVAR<<< ( startup no-highlighting ) )
- \&}}}
- .\"}}}
- .\"{{{ mode highlighting
- \&{{{ mode highlighting
- ( >>>DEFMACRO<<< add-mode-highlighting
- ( >>>SET_COUNTER<<< no-highlighting 0 )
- )
- ( >>>DEFMACRO<<< delete-mode-highlighting
- ( >>>SET_COUNTER<<< no-highlighting 1 )
- )
- \&}}}
- .\"}}}
- .\"{{{ >>>O_CREATE_FOLD<<<
- \&{{{ >>>O_CREATE_FOLD<<<
- .eX >>>O_CREATE_FOLD<<<
- .eX >>>M_O_VAR<<<
- ( >>>DEFOP<<< >>>O_CREATE_FOLD<<<-orig ( >>>O_CREATE_FOLD<<< ) )
- ( >>>UNDECLARE<<< ( >>>O_CREATE_FOLD<<< ) )
- ( >>>DEFMACRO<<< >>>O_CREATE_FOLD<<<
- ( >>>LOC<<<
- ( >>>M_O_VAR<<< )
- ( >>>IF<<< >>>AND<<<(no-highlighting =(0 >>>M_O_VAR<<<))
- ( >>>SET_COUNTER<<< >>>M_O_VAR<<< 5 )
- >>>fi_name<<<
- ; change only, if default
- ; >>>O_CREATE_FOLD<<< should be used!
- >>>O_CREATE_FOLD<<<
- )
- )
- )
- ( >>>UNDECLARE<<< ( >>>O_CREATE_FOLD<<<-orig ) )
- \&}}}
- .\"}}}
- .\"{{{ startup macro
- \&{{{ startup macro
- ( >>>DEMAND<<<
- (
- .eX >>>OCL_ARG_V<<<
- .eX >>>TEST_TERM<<<
- .\"{{{ startup-fun
- \&{{{ startup-fun
- ( >>>DEFMACRO<<< startup-fun
- ( >>>IF<<< <>(ocl-argument -1)
- ( >>>SET_COUNTER<<< startup ocl-argument )
- ; >>>OCL_ARG_V<<< set by \-O
- >>>fi_name<<<
- .\"{{{ handle bit 2, 0=statusline on
- \&{{{ handle bit 2, 0=statusline on
- >>>IF<<< >=(startup 2)
- ( >>>SET_COUNTER<<< startup -(startup 2)
- statusline-off
- )
- >>>ELSE<<<
- ( statusline-on )
- >>>fi_name<<<
- \&}}}
- .\"}}}
- .\"{{{ handle bit 1, 0=highlighting on
- \&{{{ handle bit 1, 0=highlighting on
- >>>IF<<< >(startup 0)
- ( add-mode-highlighting )
- >>>ELSE<<<
- ( delete-mode-highlighting )
- >>>fi_name<<<
- \&}}}
- .\"}}}
- .\"{{{ slow terminals => no highlighting
- >>>IF<<< >>>TEST_TERM<<< my-old-slow-terminal
- ( delete-mode-highlighting )
- >>>fi_name<<<
- .\"}}}
- >>>SET_COUNTER<<< startup 0
- )
- )
- \&}}}
- .\"}}}
- )
- )
- \&}}}
- .\"}}}
- .\"{{{ read-new-file-macro
- .eX read-newfile--macro
- .eX >>>DEMAND<<<
- .eX ">>>LOAD<<< >>>NOT<<<"
- \&{{{ read-new-file-macro
- ( >>>DEFMACRO<<< read-newfile-hook
- ( >>>IF<<< =(startup 0) ( startup-1 ) fi
- ... any code for new file handling
- >>>IF<<< =(startup 0)
- ( >>>SET_COUNTER<<< startup 1
- >>>LOAD<<< >>>NOT<<<(startup-fun
- )
- >>>fi_name<<<
- )
- )
- ( >>>DEFAUTO<<< read-newfile-hook )
- \&}}}
- .\"}}}
- .\"{{{ >>>DEFAB<<<
- .eX >>>DEFAB<<<
- \&{{{ >>>DEFAB<<<
- ( >>>DEFMACRO<<< abort-hook ( >>>SET_COUNTER<<< >>>M_O_VAR<<< 0 ) )
- ; maybe you hit abort, while the modified
- ; create fold command is active!
- ( >>>DEFAB<<< abort-hook )
- \&}}}
- .\"}}}
- : ; your stuff
- .DE
- .\"}}}
- .\"}}}
- .LP
- These examples should give an impression of what can be done using OCL.
- There are more functions/macros stored in the bindings directory. I am
- sure that you will invent more useful OCL functions/macros. If you
- wrote a really new and good one, please post it to the USENET newsgroup
- comp.editors.
- .\"}}}
- .\"}}}
- .\"{{{ Mouse extension
- .nH 1 "Mouse extension"
- .LP
- .iX mouse
- On some systems, Origami can be used with a mouse. The >>>RC_ENDING<<<-file format
- is independent from mouse-support. If Origami is not able to support the
- mouse, the corresponding information in the >>>RC_ENDING<<<-file is ignored!
- .\"{{{ available mouse-supports
- .nH 2 "Available implementations"
- .LP
- Origami can be used with a mouse in the following window environments:
- .\"{{{ X
- .nH 3 "X"
- .LP
- .iX X
- .iX xterm
- Defining the symbol \fBXTERM\fP at compile time enables the mouse
- support for X. Running Origami inside a \fBxterm\fP will activate
- \fIsend mouse position on click\fP by sending '\\033[?9s\\033[?9h' to
- the terminal and resetting afterwards. You can use up to 10 mouse
- buttons. They are named \fBButton1\fP .. \fBButton10\fP in the
- bindinglist. The mouse will only be activated, if the environment
- variable \fBTERM\fP is set to \fBxterm\fP or \fBxterm\fP\fIxxx\fP,
- \fIxxx\fP any text. Pressing the mouse will activate the Origami
- actions.
- .LP
- \fBCut\fP/\fBPaste\fP function can be reached (on a standard xterm) via
- shift mouse button. See in your xterm- and X manuals for more details
- about mapping the mouse keys. Use \fBTERM\fP to control the loading of
- different keytables for different terminals!
- .LP
- If Origami is used in an xterm, you can use the command line option
- \fB\-T\fP \fItitle\fP to change the window title to the current
- filename. After exiting Origami, the title is set to \fItitle\fP. If
- \fItitle\fP is the empty string, \fBxterm\fP is used.
- .LP
- After reading the window size once from termcap/terminfo, Origami uses
- xterm escape sequences to get the windowsize.
- .\"}}}
- .\"{{{ MGR
- .nH 3 "MGR"
- .LP
- .iX MGR
- Defining the Symbol \fBMGR\fP at compiletime enables the mouse support
- for the Bellcore window manager MGR. Running Origami will activate
- \fIsend mouse position on click\fP with \fBm_setevent\fP and resetting
- afterwards. You can use 5 mouse buttons, pressing and releasing the
- button are distinguished. The buttons are named
- \fBButton1\fP..\fBButton5\fP, \fBButton1Down\fP..\fBButton5Down\fP in
- the bindinglist (MGR does not support \fBButton4\fP and \fBButton5\fP,
- \fBButton1\fP is used for window control). The mouse will only be
- activated, if the environment variable \fB>>>TERM<<<\fP is set to
- \fBmgr\fP or \fBmgr\fP\fIxxx\fP, \fIxxx\fP any text. See in your local
- mgr manuals for more information about mouse mapping. Use
- \fB>>>ORITERM<<<\fP to control the loading of different keytables for
- different terminals!
- .\"}}}
- .\"{{{ MGR + X
- .nH 3 "X and MGR together"
- .LP
- .iX X
- .iX xterm
- .iX MGR
- MGR and X support can be used together, because the MGR mouse support
- uses the escape sequence from the X mouse support to detect a mouse
- click.
- .LP
- Enable both supports by defining XTERM and MGR.
- .LP
- The commandline option \fB\-T\fP works only, if Origami is used in a
- xterm.
- .\"}}}
- .\"}}}
- .\"{{{ multiple supports
- .nH 2 "Multiple Mouse supports"
- .LP
- Different mouse extensions in Origami and keybind (>>>RC_ENDING<<<-file) can be used
- together, if
- .nI
- both use the same `escape sequence' to mark a mouse-click
- .In
- or
- .nI
- Origami scans the mouse itself.
- .In
- In these cases, the mapping of mouse buttons is defined by Origami.
- Otherwise the mouse will not work.
- .\"}}}
- .\"{{{ Using the mouse in OCL
- .nH 2 "Using the mouse in OCL"
- .LP
- .iX xterm
- All keytables, not named like a mouse-support use the default
- mouse-support (\fBxterm\fP). This can be changed with \fB\-M
- \fP\fIxxx\fP. If the mouse-support is not set to \fBno-mouse\fP, the
- OCL-tags \fBMOUSY\fP and \fIxxx\fP are set and the mouse-variables are
- defined. Otherwise, only the buttons are mapped to commands, but the
- mouse-variables are not used and no \fBMOUSY\fP is set! The mouse can
- be used with
- .\"{{{ normal click
- .LP
- .dX >>>MOUSEMAP<<<
- \fB(>>>MOUSEMAP<<<\fP \fICOMMAND-FOR-1 COMMAND-FOR-2\fP .. \fB)\fP
- .LP
- Pressing the mouse button \fIx\fP (number \fIx\fP in the above mentioned
- namelists) will activate \fICOMMAND-FOR-x\fP, which can be any Origami
- command or OCL function. If one of the buttons should not be used, bind
- \fBno-operation\fP to it. Only the button numbers are stored in the
- >>>RC_ENDING<<<-file. The names are generated by Origami at runtime, depending on
- Origami and its runtime environment.
- .\"}}}
- .\"{{{ menu counter
- .LP
- .iX >>>MENU<<<
- .iX >>>O_LANGUAGE<<<
- If a mouse button is pressed, while \fB>>>O_LANGUAGE<<<\fP or
- \fB>>>MENU<<<\fP is active, the click will not return the above.
- Instead of the mapped command, a coding for the chosen menu item will
- be send. This is the first character of the chosen item. Clicks to
- invalid positions will be ignored.
- .\"}}}
- .LP
- .dX no-mouse
- If the chosen mouse-support is not \fBno-mouse\fP, the following OCL
- variables are defined automatically and set on mouse click before
- running the command:
- .\"{{{ table of vars
- .bI ""
- .\"{{{ button
- .bI "\fB>>>MOUSE_B<<<\fP"
- .dX >>>MOUSE_B<<<
- number of pressed button
- .Ib
- .\"}}}
- .\"{{{ outside
- .bI "\fB>>>MOUSE_O<<<\fP"
- .dX >>>MOUSE_O<<<
- .iX "display area"
- code for type of position
- .TS
- tab(|);
- c l.
- value|position
- \-2|clicked on message-line
- \-1|clicked on area
- 0|clicked inside text
- 1|clicked on fold-lines for edited file
- 2|clicked outside text
- .TE
- .Ib
- .\"}}}
- .\"{{{ buffer
- .bI "\fB>>>MOUSE_W<<<\fP"
- .dX >>>MOUSE_W<<<
- number of buffer
- .br
- or
- .br
- number of used buffers, if clicked on message line or area
- .Ib
- .\"}}}
- .\"{{{ column
- .bI "\fB>>>MOUSE_X<<<\fP"
- .dX >>>MOUSE_X<<<
- .iX "display area"
- column number
- .br
- Inside text you can use \fB>>>GOTO_COUNTER<<<\fP to reach the position.
- .Ib
- .\"}}}
- .\"{{{ line
- .bI "\fB>>>MOUSE_Y<<<\fP"
- .dX >>>MOUSE_Y<<<
- .iX "display area"
- line number of mouse position, if in text or area
- .br
- Inside text you can use \fB>>>O_GOTO_LINE<<<\fP to reach the position.
- .Ib
- .\"}}}
- .\"{{{ steps up/down
- .bI "\fB>>>MOUSE_G<<<\fP"
- .dX >>>MOUSE_G<<<
- contains the number of steps up/down, if inside text
- .br
- Use \fB>>>O_DOWN<<<\fP (or \fB>>>O_UP<<<\fP if negative) to reach the
- position.
- .Ib
- .\"}}}
- .Ib
- .\"}}}
- .\"}}}
- .\"}}}
- .\"{{{ Miscellaneous
- .nH 1 "Miscellaneous"
- .LP
- If a document is to be loaded for the first time you should verify that
- it does not contain strings which could be misinterpreted as fold marks
- by Origami. The following simple shell script looks for such strings.
- .eX mark
- .DS
- fgrep '{\&{\&{' <filename>
- fgrep '}\&}\&}' <filename>
- fgrep ':\&:\&:' <filename>
- .DE
- .\"}}}
- .\"{{{ Copyrights
- .nH 1 "Copyright appointments"
- .LP
- This chapter was not included in earlier versions, but a discussion on
- USENET convinced me to write it. Please read it carefully.
- .LP
- Each part of this software can and must be copied free. If you copy
- binaries, you must not prevent people from also copying sources. You
- must not remove my name from this program. If you want to use parts of
- it for your own purposes, point out what is your code and what is mine.
- You use this software completely at your own risk.
- .LP
- No part of this software may be used for military purposes.
- No exceptions will be made to this clause.
- .LP
- If someone wants to use this software even in part for
- commercial purposes, a written non exclusive license is needed.
- .LP
- There are no long remarks in the other files of this package about
- copyright because program code and comments about it are two different
- things, but the above conditions are valid for the whole package!
- .\"}}}
- .\"{{{ Acknowledgements
- .nH 1 "Acknowledgements"
- .LP
- Most of this manual was written by me, but the original was written by
- someone else, who did not leave his name in it. The concept of the
- folding editor was originally implemented as part of the Transputer
- development system at INMOS Ltd., Bristol, UK. The editor was a part of
- the TDS D700, and was written in Occam. It first ran on a 68000 based
- Sage/Stride development system, and later was Transputer resident on the
- PC development system.
- .LP
- Origami was rewritten from scratch in Turbo Pascal by Martin Green while
- at Ferranti Ltd, Cheadle Heath, Stockport, England, and used the same
- key mappings and editor functions as the TDS editor.
- .LP
- It was then converted from Turbo Pascal by p2c and ported by Charlie
- Lawrence, while at Eastman Kodak Co. He added lex/yacc based keyfiles,
- and did the considerable work needed to get it running in C.
- .LP
- I fixed some bugs in memory management and elsewhere, ported it to
- MINIX and later to Linux, changed its user interface to look more
- Emacs-like and added new features. Wolfgang Stumvoll (stumvoll\*(ac)
- wrote the OCL code and the keybind compiler. He also made beta tests of
- all my new versions by using them for his daily work, which helped a lot
- to find existing and new bugs. Last but not least, he wrote the OCL
- fill-paragraph, goto-matching-fence and towers-of-hanoi functions. Both of
- us made a general code clean up, which was much overdue.
- .LP
- Michael Schwingen (michaels\*(ac) ported Origami to Atari TOS and fixed
- a few minor bugs. He decided against his port being archived on the ftp
- server mentioned below, so only he knows about the available version and
- where to get it.
- .LP
- Thomas Hadig (hadig\*(ac) ported Origami to Amiga DOS. His port is available
- on the below mentioned ftp server. Usually, it is up to date with the current
- official release.
- .LP
- Robert Blum (blum\*(ac) once ported an early version back to MS/PC DOS.
- .LP
- Andrew Miller (windy\*(ac) spent much time proofreading the
- documentation and is still writing the vi Emulation. He tested most new
- versions on his MINIX machine as well.
- .LP
- Stephen R.\& van den Berg (berg\*(ac) provided the POSIX compatible
- `Better/BuGless/Berg Regular Expression' library (bregex).
- .LP
- There are too many other people in different nets all around the world, who helped
- with small tips, bug reports etc.\& to improve Origami. Thanks to all
- of you.
- .LP
- I maintain the whole Origami source code, which means that I will answer
- or forward mail concerning Origami, decide if and how extensions should
- be made, give advices for people who are porting it, post new UN*X
- versions and update the documentation. I put new releases of
- Origami on the ftp archive ftp.thp.uni-koeln.de [134.95.64.1], path
- pub/linux/origami. If you can not reach that server, try [134.95.80.1],
- path pub/thp/linux/origami.
- .\"}}}
- .\"{{{ Appendixes
- .nH 1 "Appendixes"
- .\"{{{ re
- .nH 2 "Regular expressions"
- .LP
- This version of Origami supports regular expression search and replace.
- Origamis regular expressions widely conform \fBPOSIX\fP
- \fBextended\fP/\fBbasic\fP regular expressions.
- .\"{{{ search syntax
- .nH 3 "Regular search expressions"
- .LP
- Due to the internal text representation, it is impossible to use regular
- expressions matching strings, containing newline characters.
- .LP
- Origami does not support \fBbackreference expression\fPs in basic regular
- search expressions.
- .LP
- The following is a table of known operators in basic/extended regular
- expressions. Refer to your local regular expression documentation for more
- details. basic (extended) regular subexpressions are marked with
- \fIBRegExp\fP(\fIExRegExp\fP).
- .\"{{{ table of commands
- .TS
- center tab(@);
- c c.
- \fBbasic\fP@\fBextended\fP
-
- .\"{{{ char
- .T&
- c c
- l s.
- \fIc\fP@\fIc\fP
- T{
- Each character, not used for special purpose, matches itself.
- T}
-
-
- .\"}}}
- .\"{{{ .
- .T&
- c c
- l s.
- \fB.\fP@\fB.\fP
- T{
- .dX .
- Matches any single character.
- T}
-
-
- .\"}}}
- .\"{{{ []
- .T&
- c c
- c c
- l s.
- \fB[\fP\fIclass\fP\fB]\fP@\fB[\fP\fIclass\fP\fB]\fP
- \fB[^\fP\fIclass\fP\fB]\fP@\fB[^\fP\fIclass\fP\fB]\fP
- T{
- .dX [
- .dX ]
- .iX set
- Matches a character [not] given in the brackets. \fIclass\fP can be a
- list of:
- .br
- \fIchar\fP - a single character
- .br
- character range - marked with \fIchar\fP\fB\-\fP\fIchar\fP
- .br
- or
- .br
- \fB[:\fP\fIset\fP\fB:]\fP - \fIset\fP=\fB>>>ALPHA_STR<<<\fP, ..
- .br
- \fIset\fP is a predefined character set
- .br
- user defined sets cannot be used
-
- .iX "character set"
- .br
- .br
- The following expressions are currently not support:
- .br
- .br
- Collating symbols \fB[. .]\fP
- .br
- Equivalence class expressions \fB[= =]\fP
- T}
-
-
- .\"}}}
- .\"{{{ ^
- .T&
- c c
- l s.
- \fB^\fP@\fB^\fP
- T{
- .dX ^
- Matches the start of the line, if used at the start of an expression.
- T}
-
-
- .\"}}}
- .\"{{{ $
- .T&
- c c
- l s.
- \fB$\fP@\fB$\fP
- T{
- .dX $
- Matches the end of the line, if used at the end of an expression.
- T}
-
-
- .\"}}}
- .\"{{{ RE RE
- .T&
- c c
- l s.
- \fIBRegExp\fP\h'\w'|'u'\fIBRegExp\fP@\fIExRegExp\fP\h'\w'|'u'\fIExRegExp\fP
- T{
- Matches the concatenation of strings, matching the first/second regular
- expressions.
- T}
-
-
- .\"}}}
- .\"{{{ ()
- .T&
- c c
- l s.
- \fB\e(\fP\fIBRegExp\fP\fB\e)\fP@\fB(\fP\fIExRegExp\fP\fB)\fP
- T{
- .dX (
- .dX )
- Group the enclosed regular expression, which can be accessed by \fB\e\fP\fIx\fP
- in the replace pattern.
- T}
-
-
- .\"}}}
- .\"{{{ |
- .T&
- c c
- l s.
- \fIBRegExp\fP\fB\e|\fP\fIBRegExp\fP@\fIExRegExp\fP\fB|\fP\fIExRegExp\fP
- T{
- .dX |
- Matches a string, matching one of the given regular expressions.
- .br
- \fBN.B.\fP: \fB\e|\fP is an extension in basic regular expressions.
- T}
-
-
- .\"}}}
- .\"{{{ +
- .T&
- c c
- l s.
- \fIBRegExp\fP\fB\e+\fP@\fIExRegExp\fP\fB+\fP
- T{
- .dX +
- Matches one or more occurances of the given regular expression.
- .br
- \fBN.B.\fP: \fB\e+\fP is an extension in basic regular expressions.
- T}
-
-
- .\"}}}
- .\"{{{ ?
- .T&
- c c
- l s.
- \fIBRegExp\fP\fB\e?\fP@\fIExRegExp\fP\fB?\fP
- T{
- .dX ?
- Matches zero or one occurances of the given regular expression.
- .br
- \fBN.B.\fP: \fB\e?\fP is an extension in basic regular expressions.
- T}
-
-
- .\"}}}
- .\"{{{ *
- .T&
- c c
- l s.
- \fIBRegExp\fP\fB*\fP@\fIExRegExp\fP\fB*\fP
- T{
- .dX *
- Matches zero or more occurances of the given regular expression.
- T}
-
-
- .\"}}}
- .\"{{{ {}
- .T&
- c c
- c c
- l s.
- \fIBRegExp\fP\fB\e{\fP\fIn\fP\fB\e}\fP@\fIExRegExp\fP\fB{\fP\fIn\fP\fB}\fP
- \fIBRegExp\fP\fB\e{\fP\fIn\fP\fB,\fP\fIm\fP\fB\e}\fP@\fIExRegExp\fP\fB{\fP\fIn\fP\fB,\fP\fIm\fP\fB}\fP
- T{
- .dX {
- .dX }
- Repeats the regular expression \fIn\fP [to \fIm\fP] times. \fIn\fP[,\fIm\fP]
- have to be decimals, 0<=\fIn\fP[<=\fIm\fP].
- T}
-
-
- .\"}}}
- .\"{{{ !
- .T&
- c c
- l s.
- \fB\e!\fP\fIBRegExp\fP@\fB!\fP\fIExRegExp\fP
- T{
- .dX !
- Match the next line, not containing the following regular expression.
- [\fB\e\fP]\fB!\fP is only allowed at the beginning of a regular
- expression.
- .br
- \fBN.B.\fP: [\fB\e\fP]\fB!\fP is an extension in basic and extended
- regular expressions.
- T}
-
-
- .\"}}}
- .TE
- .\"}}}
- .\"}}}
- .\"{{{ replace syntax
- .nH 3 "Regular replace expressions"
- .LP
- Inside regular expression search and replace, the replace pattern may
- contain the following subexpressions:
- .\"{{{ table of commands
- .TS
- center tab(@);
- c c.
- \fBbasic\fP@\fBextended\fP
-
- .\"{{{ char
- .T&
- c c
- l s.
- \fIcharacter\fP@\fIcharacter\fP
- T{
- Each character, not used for special purpose.
- T}
-
-
- .\"}}}
- .\"{{{ \N
- .T&
- c c
- l s.
- \fB\e\fP\fIN\fP@\fB\e\fP\fIN\fP
- T{
- .dX \\\\e
- Is the text, matched by the \fIN\fP-th group.
- .br
- This can only be used, if there is a corresponding \fB(\fP..\fB)\fP pair
- in the search expression!
- .br
- \fIN\fP is [\fBg\fP\fIdigit\fP]*\fIdigit\fP (\fBg\fP is used, to mark
- numbers >9!).
- T}
-
-
- .\"}}}
- .\"{{{ \uN
- .T&
- c c
- l s.
- \fB\eu\fP\fIN\fP@\fB\eu\fP\fIN\fP
- T{
- .dX \\\\eu
- Is the text, matched by the \fIN\fP-th group with lowercase letters
- converted to uppercase.
- .br
- This can only be used, if there is a corresponding \fB(\fP..\fB)\fP pair
- in the search expression!
- .br
- \fIN\fP is [\fBg\fP\fIdigit\fP]*\fIdigit\fP (\fBg\fP is used, to mark
- numbers >9!).
- T}
-
-
- .\"}}}
- .\"{{{ \lN
- .T&
- c c
- l s.
- \fB\el\fP\fIN\fP@\fB\el\fP\fIN\fP
- T{
- .dX \\\\el
- Is the text, matched by the \fIN\fP-th group with uppercase letters
- converted to lowercase.
- .br
- This can only be used, if there is a corresponding \fB(\fP..\fB)\fP pair
- in the search expression!
- .br
- \fIN\fP is [\fBg\fP\fIdigit\fP]*\fIdigit\fP (\fBg\fP is used, to mark
- numbers >9!).
- T}
-
-
- .\"}}}
- .\"{{{ \{Nexpr}
- .T&
- c c
- l s.
- \fB\e{\fP\fINexpr\fP\fB}\fP@\fB\e{\fP\fINexpr\fP\fB}\fP
- T{
- .iX \\\\e
- .dX \\\\e{
- .dX {
- .dX }
- Use the first characters of \fIexpr\fP, up to the length of the
- \fIN\fP-th group in the search string. If \fIexpr\fP is not long
- enough, the last character will be repeated up to the needed length. If
- \fIfIexpr\fP is the empty string, space will be used for padding.
- .dX \\\\e0
- \fB\e0\fP can be used as last character in \fIexpr\fP to suppress padding.
- .br
- This can only be used, if there is a corresponding \fB(\fP..\fB)\fP pair
- in the search expression!
- .br
- \fIN\fP is [\fBg\fP\fIdigit\fP]*\fIdigit\fP (\fBg\fP is used, to mark
- numbers >9!).
- T}
-
-
- .\"}}}
- .\"{{{ \?Nexpr}
- .T&
- c c
- l s.
- \fB\e?\fP\fINexpr\fP\fB}\fP@\fB\e?\fP\fINexpr\fP\fB}\fP
- T{
- .iX \\\\e
- .dX \\\\e?
- .dX ?
- .dX }
- If the \fIn\fP-th group matched, add \fIexpr\fP, otherwise the empty
- string.
- .br
- \fIN\fP is [\fBg\fP\fIdigit\fP]*\fIdigit\fP (\fBg\fP is used, to mark
- numbers >9!).
- T}
-
-
- .\"}}}
- .\"{{{ \!Nexpr}
- .T&
- c c
- l s.
- \fB\e!\fP\fINexpr\fP\fB}\fP@\fB\e!\fP\fINexpr\fP\fB}\fP
- T{
- .iX \\\\e
- .dX \\\\e!
- .dX !
- .dX }
- If the \fIn\fP-th group did not match, add \fIexpr\fP, otherwise the
- empty string.
- .br
- \fIN\fP is [\fBg\fP\fIdigit\fP]*\fIdigit\fP (\fBg\fP is used, to mark
- numbers >9!).
- T}
-
-
- .\"}}}
- .\"{{{ \}
- .T&
- c c
- l s.
- \fB\e}\fP@\fB\e}\fP
- T{
- .iX \\\\e
- Use inside of complex replace expressions to generate a single \fB}\fP.
- T}
-
-
- .\"}}}
- .\"{{{ \ \ ;
- .T&
- c c
- l s.
- \fB\e\e\fP@\fB\e\e\fP
- T{
- .iX \\\\e
- Represent \fB\e\fP.
- T}
-
-
- .\"}}}
- .TE
- .\"}}}
- .\"}}}
- .\"}}}
- .bp
- .\"{{{ messages
- .nH 2 "Messages"
- .\"{{{ what are the messages
- .LP
- .iX ".origami>>>MSG_ENDING<<<"
- The following is the list of all messages, Origami can display and
- which can be used in OCL-commands using the Origami messages. They are
- stored in the file \fB.origami>>>MSG_ENDING<<<\fP and can be changed by editing this
- file. If you are doing this, do not change the length of the lines, the
- type and order of the used formats.
- .\"}}}
- .\"{{{ description of types
- .LP
- Different messages are used in different ways. The first character of
- the message-name indicates the usage:
- .\"{{{ known tags
- .nI
- .TS
- tab(|);
- l l.
- \fBD\fP|display-characters:
- |specifying some display-details
- \fBF\fP|format strings:
- |should only used with \fB>>>LASTMES<<<\fP
- \fBI\fP|prompt strings:
- |first character is used for \fByes\fP,..
- \fBM\fP|strings to be displayed
- .TE
- .In
- .\"}}}
- .LP
- If \fBF_\fP\fIxxx\fP messages are used inside OCL-prompts, string
- arguments are replaced by empty strings, integer and character arguments
- are replaced by undefined numbers/characters.
- .\"}}}
- .LP
- The known messages are:
- .\"{{{ list of messages (automatically generated by make!)
- .so msg.AMS
- .\"}}}
- .\"}}}
- .bp
- .\"{{{ OCL-assembler
- .nH 2 "OCL-assembler"
- .LP
- .nH 3 "Syntax"
- .LP
- There are commands with different kinds of arguments. The following
- command-types are known:
- .\"{{{ table of known types
- .nI
- .ne 8
- .TS
- center tab(|);
- l l.
- COM|without arguments
- COM_I|with variable/integer argument
- COM_C|with character argument
- COM_A|with address argument
- COM_II|with 2 variable/integer arguments
- COM_P|with message-string argument
- COM_IP|with variable/integer and message-string arguments
- COM_IIP|with 2 variable/integer and message-string arguments
- .TE
- .In
- .\"}}}
- .LP
- OCL-assembler statements are (OCL-assembler programs are not handled by
- the optimizer!):
- .\"{{{ label
- .bI "\fB\&.\fP\fIlabel\fP
- Each unused identifier can be used as a label. No code will be
- generated, but \fIlabel\fP can be used for jump-commands. The
- definition of a label has to be marked with a leading \fB.\fP.
- .Ib
- .\"}}}
- .\"{{{ origami functions/macros
- .bI "Origami functions and macros"
- All Origami functions and OCL-macros with length 1 (\fB>>>DEFMACRO<<<\fPs or
- single command \fB>>>DEFOP<<<\fPs or \fBinit_fun\fPs).
- .Ib
- .\"}}}
- .\"{{{ >>>EVAL<<<
- .bI "\fB>>>EVAL<<< (\fP \fIstatement\fP ... \fB)\fP"
- Compile the OCL program '\fIstatement\fP ...'. The assembler program
- calls it as subroutine. The compiled list of OCL-statements might be
- optimized.
- .Ib
- .\"}}}
- .\"{{{ number
- .sI "\fBnumber\fP"
- .Is
- .\"}}}
- .\"{{{ text
- .sI \fB"\fP\fItext\fP
- .Is
- .\"}}}
- .\"{{{ statement
- .bI "\fIcommand\fP [\fIargument\fP [\fIargument\fP [\fIargument\fP]]]
- \fIcommand\fP is one of the OCL-assembler statements, explained below.
- \fIargument\fPs are (depending on commandtype of \fIstatement\fP):
- .\"{{{ int
- .bI "integer argument:"
- .\"{{{ var
- .bI "[\fB+\fP \fInumber\fP] ... \fIvariable-name\fP"
- The following variable names are hidden variables, used by keybind to
- code the OCL-statements. These variables can be used only in
- OCL-assembler code directly!
- .TS
- tab(|);
- l l.
- \fB(dummy\fP\fIx\fP\fB)\fP,\fIx\fP=0,1,...|term evaluation
- \fB(arg\fP\fIx\fP\fB)\fP,\fIx\fP=0,1,...|argument passing
- \fB(loc\fP\fIx\fP\fB)\fP,\fIx\fP=0,1,...|save arguments
- \fB(repeat)\fP|used for \fB>>>REPEAT<<<\fP
- \fB(return)\fP|return value for functions/macros
- \fB(rel_op)\fP|\fB<\fP,.. #arguments > 2
- .TE
- .Ib
- .\"}}}
- .\"{{{ number
- .bI "[\fB+\fP \fInumber\fP] ... \fIvar-address\fP"
- \fIvar-address\fP is a non negative integer constant.
- .Ib
- .\"}}}
- .\"{{{ msg
- .bI "[\fB+\fP \fInumber\fP] ... \fImessage-name\fP"
- The coding of \fImessage-name\fP, which is one of the above listed
- messages, stored in \fB.origami>>>MSG_ENDING<<<\fP.
- .Ib
- .\"}}}
- .Ib
- .\"}}}
- .\"{{{ char
- .bI "character argument:"
- .sI "\fInumber\fP, \fInumber\fP>=0"
- .Is
- .sI \fB"\fP\fIcharacter\fP
- .Is
- .Ib
- .\"}}}
- .\"{{{ address
- .bI "address argument:"
- .\"{{{ label
- .bI "[\fB+\fP \fInumber\fP] ... \fIlabel\fP"
- Use address \fIlabel\fP with given offset as target address.
- .Ib
- .\"}}}
- .\"{{{ offset
- .bI "[\fB+\fP \fInumber\fP] ... \fIjump-offset\fP"
- Use the sum of given values as relative jump offset.
- .Ib
- .\"}}}
- .Ib
- .\"}}}
- .\"{{{ message-strings
- .bI "message-string argument"
- \fImessage-string\fP uses the same syntax as in normal OCL-statements.
- You have to add a \fBM_END_MACRO\fP yourself, to mark the end of the
- message-string!
- .LP
- For example:
- .sI "\fBM_PROMPT 2 ( M_ABORTED >>>COUNTER<<< x ) M_END_MACRO\fP"
- .Is
- .Ib
- .\"}}}
- .Ib
- .\"}}}
- .nH 3 "Commands"
- .LP
- .\"{{{ table of commands (automatically generated by make!)
- The permission tags, used in the following table mean:
- .\"{{{ *
- .bI *
- Always allowed, handled in innermost OCL-automat.
- .Ib
- .\"}}}
- .\"{{{ -
- .bI -
- Allowed, if no view-mode, folding or other restrictions are active.
- .Ib
- .\"}}}
- .\"{{{ V
- .bI V
- .iX view-mode
- Allowed during view.
- .Ib
- .\"}}}
- .\"{{{ P
- .bI P
- Allowed in prompts.
- .Ib
- .\"}}}
- .\"{{{ F
- .bI F
- .iX >>>O_CREATE_FOLD<<<
- Allowed during create fold.
- .Ib
- .\"}}}
- .\"{{{ f
- .bI f
- .iX >>>O_CREATE_FOLD<<<
- Not allow during create fold, but can be used, while the extended
- highlighting is active.
- .Ib
- .\"}}}
- The known assembler statements are:
- .so token.AMS
- .\"}}}
- .\"}}}
- .bp
- .\"{{{ command line options
- .nH 2 "Command line options"
- .LP
- The following is part of the online help. Origamis usage is
- .DS
- \fBorigami\fP [\fIoption\fP ...] [\fIfile\fP ...]
- .DE
- where \fIoptions\fP can be:
- .\"{{{ list off known options
- .\"{{{ define iP: [.Ib] .bI
- .nr iP 0
- .de iP
- .ie \\n(iT .Ib
- .el .nr iT 1
- .bI "\\$1"
- ..
- .\"}}}
- .\"{{{F ../man/o-opt.sed.MAN
- .\":::F ../man/o-opt.sed.MAN
- .\"}}}
- .so ../man/o-opt.sed.MAN
- .Ib
- .\"}}}
- .\"}}}
- .bp
- .\"{{{ compiletime configuration
- .nH 2 "Compiletime Configuration"
- .LP
- There are many parameters, which can be changed at compiletime. More
- details about changings these constants are given in the source of this
- distribution. A short list of the possible changes follows.
- .wA
- Changing these constants may produce incompatible >>>RC_ENDING<<<-files!
- .\"{{{ Languages
- .bI "Languages"
- The predefined languages for fold hiding can be changed.
- .Ib
- .\"}}}
- .\"{{{ constants
- .bI "Constants"
- Some constants describing table sizes and string length:
- .\"{{{ DEFAULT_LINELEN
- .sI "linelength (>>>LINELEN<<<)"
- .Is
- .\"}}}
- .\"{{{ TDS_LEN
- .sI "length of TDS lines (>>>TDS_LEN<<<)"
- .Is
- .iX TDS
- .iX language
- .\"}}}
- .\"{{{ FOLD_COMMENT_LENGTH
- .sI "length of user comment strings (>>>FOLD_COMMENT_LENGTH<<<)"
- .Is
- .iX comment
- .iX folding
- .iX language
- .dX >>>O_LANGUAGE<<<
- .\"}}}
- .\"{{{ SHORT_F_C_LENGTH
- .sI "cut length for user comment strings in statusline(>>>SHORT_F_C_LENGTH<<<)"
- .Is
- .iX folding
- .iX comment
- .dX >>>O_LANGUAGE<<<
- .iX language
- .iX "status line"
- .\"}}}
- .\"{{{ DEFAULT_UNDEL
- .sI "size of delete-buffer (>>>UNDEL_LINES<<<)"
- .Is
- .iX "delete buffer"
- .iX >>>O_DEL_LINE<<<
- .\"}}}
- .\"{{{ MAX_MACRO_LENGTH
- .sI "length of keyboard macros (>>>MAX_MACRO_LENGTH<<<)"
- .Is
- .iX >>>O_DEF_MACRO<<<
- .iX macro
- .\"}}}
- .\"{{{ NAME_LG
- .sI "identifier length (>>>NAME_LG<<<)"
- .Is
- .iX name
- .\"}}}
- .\"{{{ BIND_NAME_LEN
- .sI "length of binding names and command line aliases (>>>BIND_NAME_LEN<<<)"
- .Is
- .iX >>>BINDNAME<<<
- .iX "Command line options"
- .\"}}}
- .\"{{{ FOLD_PATTERN_LEN
- .sI "length of mark names (>>>FOLD_PATTERN_LEN<<<)"
- .Is
- .iX >>>DEFMARK<<<
- .\"}}}
- .\"{{{ ALIAS_LG
- .sI "length of keysequences (>>>ALIAS_LG<<<)"
- .Is
- .iX keysequence
- .iX >>>KEYALIAS<<<
- .iX >>>KEYDEF<<<
- .\"}}}
- .\"{{{ RC_HELP_LEN
- .sI "line length in help (>>>RC_HELP_LEN<<<)"
- .Is
- .iX .origamirc
- .iX .origami>>>HELP_ENDING<<<
- .\"}}}
- .\"{{{ OCL_CODE_LEN
- .sI "OCL statement length (>>>OCL_CODE_LEN<<<)"
- .Is
- .iX macro
- .iX function
- .\"}}}
- .\"{{{ OCL_FILE_DEPTH
- .sI "OCL filed-fold stack depth (>>>OCL_FILE_DEPTH<<<)"
- .Is
- .\"}}}
- .\"{{{ MODE_COUNT
- .sI "number of user modes (>>>MODE_COUNT<<<)"
- .Is
- .iX >>>DEFMODE<<<
- .\"}}}
- .\"{{{ MIN_ALARMTIME
- .sI "minimum auto-save time (>>>MIN_ALARMTIME<<<)"
- .Is
- .iX autosave-mode
- .iX >>>O_A_AUTO_SAVE<<<
- .iX >>>O_D_AUTO_SAVE<<<
- .\"}}}
- .\"{{{ MAX_ALARMTIME
- .sI "maximum auto-save time (>>>MAX_ALARMTIME<<<)"
- .Is
- .iX autosave-mode
- .iX >>>O_A_AUTO_SAVE<<<
- .iX >>>O_D_AUTO_SAVE<<<
- .\"}}}
- .\"{{{ NORM_ALARMTIME
- .sI "default auto-save time (>>>NORM_ALARMTIME<<<)"
- .Is
- .iX autosave-mode
- .iX >>>O_A_AUTO_SAVE<<<
- .iX >>>O_D_AUTO_SAVE<<<
- .\"}}}
- .\"{{{ HISTORY_SIZE
- .sI "history minimum size (>>>HISTORY_SIZE<<<)"
- .Is
- .iX history
- .\"}}}
- .\"{{{ HISTORY_MAX
- .sI "history maximum size (>>>HISTORY_MAX<<<)"
- .Is
- .iX history
- .\"}}}
- .\"{{{ NO_OCL_CMD_OPTS
- .sI "number of command line aliases (>>>NO_OCL_CMD_OPTS<<<)"
- .Is
- .iX "Command line options"
- .\"}}}
- .\"{{{ DIM_OCL_CMD_OPTS
- .sI "dimension of \fB>>>OCL_ARG_RECORD_V<<<\fP (>>>DIM_OCL_CMD_OPTS<<<)"
- .Is
- .iX ">>>OCL_ARG_RECORD_V<<<"
- .\"}}}
- .\"{{{ number of regular expression patterns
- .sI "regular replace patterns (>>>PAT_COUNT<<<)"
- .Is
- .iX regular expression
- .\"}}}
- .Ib
- .\"}}}
- .\"{{{ env-vars
- .bI "Environment variables"
- The names for the environment variables:
- .\"{{{ HOME
- .sI \fB>>>HOME<<<\fP
- .Is
- .iX >>>HOME<<<
- .\"}}}
- .\"{{{ TERM
- .sI \fB>>>TERM<<<\fP
- .Is
- .iX >>>TERM<<<
- .\"}}}
- .\"{{{ SHELL
- .sI \fB>>>SHELL<<<\fP
- .Is
- .iX >>>SHELL<<<
- .\"}}}
- .Ib
- .\"}}}
- .\"{{{ strings
- .bI "Strings"
- You can change the following strings:
- .\"{{{ msg
- .bI "\fB\&.origami>>>MSG_ENDING<<<\fP"
- .iX ".origami>>>MSG_ENDING<<<"
- All formats, given in \fB.origami>>>MSG_ENDING<<<\fP can be changed by changing the
- default file.
- .Ib
- .\"}}}
- .\"{{{ ORIGAMI_RC_PATH
- .bI "default resource path"
- .iX >>>ORIPATH<<<
- .iX >>>ORIPATH_1<<<
- the default value for the environment variable \fB>>>ORIPATH<<<\fP
- (>>>ORIGAMI_RC_PATH_STRING<<<)
- .Ib
- .\"}}}
- .\"{{{ KBD_PATH
- .bI "default keybind library path"
- .iX >>>KBDPATH<<<
- .iX >>>KBDPATH_1<<<
- the default value for environment variable \fB>>>KBDPATH<<<\fP
- (>>>KBD_PATH_STRING<<<)
- .Ib
- .\"}}}
- .\"{{{ View
- .sI "\fB>>>VIEW_TAG<<<\fP/\fB>>>sVIEW_TAG<<<\fP"
- .Is
- .iX >>>VIEW_TAG<<<
- .iX >>>sVIEW_TAG<<<
- .iX view-mode
- .iX >>>O_A_VIEW<<<
- .iX >>>O_D_VIEW<<<
- .iX "status line"
- .\"}}}
- .\"{{{ DirView
- .sI "\fB>>>DV_TAG<<<\fP/\fB>>>sDV_TAG<<<\fP"
- .Is
- .iX >>>DV_TAG<<<
- .iX >>>sDV_TAG<<<
- .iX directory
- .iX "status line"
- .\"}}}
- .\"{{{ DefMac
- .sI "\fB>>>DM_TAG<<<\fP/\fB>>>sDM_TAG<<<\fP"
- .Is
- .iX >>>DM_TAG<<<
- .iX >>>sDM_TAG<<<
- .iX macro
- .iX >>>O_DEF_MACRO<<<
- .iX "status line"
- .\"}}}
- .\"{{{ Folding
- .sI "\fB>>>FOLD_TAG<<<\fP/\fB>>>sFOLD_TAG<<<\fP"
- .Is
- .iX >>>FOLD_TAG<<<
- .iX >>>sFOLD_TAG<<<
- .iX folding
- .iX >>>O_CREATE_FOLD<<<
- .iX "status line"
- .\"}}}
- .\"{{{ Over
- .sI "\fB>>>OVER_TAG<<<\fP/\fB>>>sOVER_TAG<<<\fP"
- .Is
- .iX >>>OVER_TAG<<<
- .iX >>>sOVER_TAG<<<
- .iX overwrite-mode
- .iX >>>O_D_OVER<<<
- .iX >>>O_A_OVER<<<
- .iX "status line"
- .\"}}}
- .\"{{{ AutoSave
- .sI "\fB>>>AUTO_TAG<<<\fP/\fB>>>sAUTO_TAG<<<\fP"
- .Is
- .iX >>>O_D_AUTO_SAVE<<<
- .iX >>>O_A_AUTO_SAVE<<<
- .iX autosave-mode
- .iX >>>AUTO_TAG<<<
- .iX >>>sAUTO_TAG<<<
- .iX "status line"
- .\"}}}
- .\"{{{ NoParse
- .sI "\fB>>>NOPAR_TAG<<<\fP/\fB>>>sNOPAR_TAG<<<\fP"
- .Is
- .iX >>>O_D_NOPARSE<<<
- .iX >>>O_A_NOPARSE<<<
- .iX no-parse-mode
- .iX >>>NOPAR_TAG<<<
- .iX >>>sNOPAR_TAG<<<
- .iX "status line"
- .\"}}}
- .\"{{{ hash-shift
- .sI "\fB>>>H_SHIFT_TAG<<<\fP"
- .Is
- .iX "status line"
- .\"}}}
- .\"{{{ CUT_PATH
- .sI "\fB>>>CUT_PATH<<<\fP"
- .Is
- .iX "status line"
- .\"}}}
- .Ib
- .\"}}}
- .\"}}}
- .\"}}}
-